Skip to content

Commit 3f9b55b

Browse files
committed
add comment
1 parent 7b5de7f commit 3f9b55b

File tree

1 file changed

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

1 file changed

+2
-0
lines changed

packages/svelte/src/internal/client/reactivity/store.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ export function store_get(store, store_name, stores) {
3535

3636
entry.unsubscribe = subscribe_to_store(store, (v) => {
3737
if (initial) {
38+
// if the first time the store value is read is inside a derived,
39+
// we will hit the `state_unsafe_mutation` error if we `set` the value
3840
entry.source.v = v;
3941
initial = false;
4042
} else {

0 commit comments

Comments
 (0)