Skip to content

Commit dbf2b4c

Browse files
committed
simplify
1 parent 42f73a0 commit dbf2b4c

File tree

1 file changed

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

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,10 @@ export function proxy(value, onchange) {
300300
// object property before writing to that property.
301301
if (s === undefined) {
302302
if (!has || get_descriptor(target, prop)?.writable) {
303-
const opt = onchange;
304-
s = with_parent(() => source(undefined, opt, stack));
303+
s = with_parent(() => source(undefined, onchange, stack));
305304
set(
306305
s,
307-
with_parent(() => proxy(value, opt))
306+
with_parent(() => proxy(value, onchange))
308307
);
309308
sources.set(prop, s);
310309
}

0 commit comments

Comments
 (0)