Skip to content

Commit 66c23c2

Browse files
Algorithm5838github-actions[bot]
authored andcommitted
fix: cancel pending rAFs on Chat destroy
1 parent e1e91db commit 66c23c2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/lib/components/chat/Chat.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,10 @@
845845
846846
return () => {
847847
try {
848+
cancelAnimationFrame(scrollRAF);
849+
cancelAnimationFrame(contentsRAF);
850+
scrollRAF = null;
851+
contentsRAF = null;
848852
if (controlsSaveTimer !== null) {
849853
clearTimeout(controlsSaveTimer);
850854
controlsSaveTimer = null;

0 commit comments

Comments
 (0)