Skip to content

Commit d950577

Browse files
committed
chore: re-use current active effect for toStore if it already exists
1 parent 9a719fe commit d950577

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/svelte/src/store/index-client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export function toStore(get, set) {
5252
const value = get();
5353
if (ran) set(value);
5454
});
55-
}
55+
};
5656
const teardown = active_effect === null ? effect_root(render) : render();
5757

5858
ran = true;

0 commit comments

Comments
 (0)