Skip to content

Commit ac05b73

Browse files
committed
fix
1 parent 6c9380c commit ac05b73

File tree

1 file changed

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

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,6 @@ export function proxy(value, onchange) {
296296
if (s === undefined) {
297297
if (!has || get_descriptor(target, prop)?.writable) {
298298
s = with_parent(() => source(undefined, onchange, stack));
299-
set(
300-
s,
301-
with_parent(() => proxy(value, onchange))
302-
);
303299
sources.set(prop, s);
304300
}
305301
} else {
@@ -310,7 +306,9 @@ export function proxy(value, onchange) {
310306
if (onchange && typeof s.v === 'object' && s.v !== null && STATE_SYMBOL in s.v) {
311307
s.v[PROXY_ONCHANGE_SYMBOL](onchange, true);
312308
}
309+
}
313310

311+
if (s !== undefined) {
314312
set(
315313
s,
316314
with_parent(() => proxy(value, onchange))

0 commit comments

Comments
 (0)