Skip to content

Commit

Permalink
mark original atom changed
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaskasky committed Jan 6, 2025
1 parent c6e4d81 commit ea0ed26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vanilla/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ const buildStore = (...storeArgs: StoreArgs): Store => {
atom: Atom<Value>,
atomState: AtomState<Value>,
) => {
const dependents = new Map<AnyAtom, AtomState>()
const dependents = new Map<AnyAtom, AtomState>([[atom, atomState]])
const stack: [AnyAtom, AtomState][] = [[atom, atomState]]
while (stack.length > 0) {
const [a, aState] = stack.pop()!
Expand Down

0 comments on commit ea0ed26

Please sign in to comment.