Skip to content

Commit 084aabf

Browse files
committed
don't set owners to null when parent exists
1 parent abeb31a commit 084aabf

File tree

1 file changed

+6
-4
lines changed
  • packages/svelte/src/internal/client

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,12 @@ export function proxy(value, immutable = true, parent = null) {
6969

7070
// @ts-expect-error
7171
value[STATE_SYMBOL].owners =
72-
parent === null && current_component_context !== null
73-
? // @ts-expect-error
74-
new Set([current_component_context.function])
75-
: null;
72+
parent === null
73+
? current_component_context !== null
74+
? // @ts-expect-error
75+
new Set([current_component_context.function])
76+
: null
77+
: parent.owners;
7678
}
7779

7880
return proxy;

0 commit comments

Comments
 (0)