Skip to content

Commit b64cfc6

Browse files
committed
update comment
1 parent 5f2abc8 commit b64cfc6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/svelte/src/internal/client/runtime.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -966,8 +966,9 @@ export function get(signal) {
966966
e.state_unsafe_local_read();
967967
}
968968

969-
// if we're in an async derived, the parent effect could have
970-
// already been destroyed
969+
// if we're in a derived that is being read inside an _async_ derived,
970+
// it's possible that the effect was already destroyed. In this case,
971+
// we don't add the dependency, because that would create a memory leak
971972
var destroyed = active_effect !== null && (active_effect.f & DESTROYED) !== 0;
972973

973974
if (!destroyed) {

0 commit comments

Comments
 (0)