Skip to content

Commit af2a6b2

Browse files
committed
fix: cancel pending rAFs on Chat destroy
1 parent 5649d90 commit af2a6b2

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
@@ -835,6 +835,10 @@
835835
try {
836836
clearTimeout(saveControlsTimer);
837837
saveControls();
838+
cancelAnimationFrame(scrollRAF);
839+
cancelAnimationFrame(contentsRAF);
840+
scrollRAF = null;
841+
contentsRAF = null;
838842
if (chatIdProp && !$temporaryChatEnabled) {
839843
updateLastReadAt(chatIdProp);
840844
}

0 commit comments

Comments
 (0)