refac
This commit is contained in:
1 parent
e6b00a8905
commit
626fcff417
1 file changed
+5
-1
@@ -934,7 +934,8 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$: if (history) {
|
const onHistoryChange = (history) => {
|
||||||
|
if (history) {
|
||||||
cancelAnimationFrame(contentsRAF);
|
cancelAnimationFrame(contentsRAF);
|
||||||
contentsRAF = requestAnimationFrame(() => {
|
contentsRAF = requestAnimationFrame(() => {
|
||||||
getContents();
|
getContents();
|
||||||
@@ -943,6 +944,9 @@
|
|||||||
} else {
|
} else {
|
||||||
artifactContents.set([]);
|
artifactContents.set([]);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$: onHistoryChange(history);
|
||||||
|
|
||||||
const getContents = () => {
|
const getContents = () => {
|
||||||
const messages = history ? createMessagesList(history, history.currentId) : [];
|
const messages = history ? createMessagesList(history, history.currentId) : [];
|
||||||
|
|||||||
Reference in new issue
Block a user