We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f2abc8 commit b64cfc6Copy full SHA for b64cfc6
packages/svelte/src/internal/client/runtime.js
@@ -966,8 +966,9 @@ export function get(signal) {
966
e.state_unsafe_local_read();
967
}
968
969
- // if we're in an async derived, the parent effect could have
970
- // already been destroyed
+ // if we're in a derived that is being read inside an _async_ derived,
+ // 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
972
var destroyed = active_effect !== null && (active_effect.f & DESTROYED) !== 0;
973
974
if (!destroyed) {
0 commit comments