Avoid capturing stale cleanup function in chat

This commit is contained in:
Jon Staab
2026-05-06 09:31:28 -07:00
parent c6b0799b2a
commit 99fe0e543c
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -404,7 +404,8 @@
onMount(() => {
start()
return cleanup
// Wrap in a closure to avoid calling a stale cleanup function
return () => cleanup?.()
})
</script>
+2 -1
View File
@@ -297,7 +297,8 @@
onMount(() => {
start()
return cleanup
// Wrap in a closure to avoid calling a stale cleanup function
return () => cleanup?.()
})
</script>