Skip to content

Commit 9c05042

Browse files
committed
pass value to setter
1 parent 9d74e22 commit 9c05042

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/svelte/src/compiler/phases/3-transform/shared/spread_bindings.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ export function init_spread_bindings(spread_expression, { state, visit }) {
3131
const binding = is_server ? b.call(id) : b.call('$.get', id);
3232

3333
const get = b.thunk(b.call(b.member(binding, b.literal(0), true)));
34-
const set = b.thunk(b.call(b.member(binding, b.literal(1), true), b.id('$$value')));
34+
const set = b.arrow(
35+
[b.id('$$value')],
36+
b.call(b.member(binding, b.literal(1), true), b.id('$$value'))
37+
);
3538
return { get, set };
3639
}

0 commit comments

Comments
 (0)