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(() => {
|
onMount(() => {
|
||||||
start()
|
start()
|
||||||
|
|
||||||
return cleanup
|
// Wrap in a closure to avoid calling a stale cleanup function
|
||||||
|
return () => cleanup?.()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -297,7 +297,8 @@
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
start()
|
start()
|
||||||
|
|
||||||
return cleanup
|
// Wrap in a closure to avoid calling a stale cleanup function
|
||||||
|
return () => cleanup?.()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue