Avoid capturing stale cleanup function in chat
This commit is contained in:
parent
c6b0799b2a
commit
99fe0e543c
2 changed files with 4 additions and 2 deletions
|
|
@ -404,7 +404,8 @@
|
|||
onMount(() => {
|
||||
start()
|
||||
|
||||
return cleanup
|
||||
// Wrap in a closure to avoid calling a stale cleanup function
|
||||
return () => cleanup?.()
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -297,7 +297,8 @@
|
|||
onMount(() => {
|
||||
start()
|
||||
|
||||
return cleanup
|
||||
// Wrap in a closure to avoid calling a stale cleanup function
|
||||
return () => cleanup?.()
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue