Skip to content

Commit 4757b1b

Browse files
Update packages/svelte/src/reactivity/create-subscriber.js
Co-authored-by: Elliott Johnson <[email protected]>
1 parent 89b93a1 commit 4757b1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/svelte/src/reactivity/create-subscriber.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export function createSubscriber(start) {
7070

7171
return () => {
7272
queueMicrotask(() => {
73-
// Only count down after timeout, else we would reach 0 before our own render effect reruns,
73+
// Only count down after a microtask, else we would reach 0 before our own render effect reruns,
7474
// but reach 1 again when the tick callback of the prior teardown runs. That would mean we
7575
// re-subcribe unnecessarily and create a memory leak because the old subscription is never cleaned up.
7676
subscribers -= 1;

0 commit comments

Comments
 (0)