Skip to content

Commit

Permalink
Move getters in fromStore.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
expelledboy committed Feb 14, 2025
1 parent 579c0fa commit 36cccf1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/xstate-store/src/fromStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function fromStore<
const newSnapshot = {
...snapshot,
context: newContext,
...computeGetters(newContext, getters)
getters: computeGetters(newContext, getters)
} as StoreSnapshot<TContext, TGetters>;

for (const effect of effects) {
Expand All @@ -101,7 +101,7 @@ export function fromStore<
context,
output: undefined,
error: undefined,
...computeGetters(context, getters)
getters: computeGetters(context, getters)
} satisfies StoreSnapshot<TContext, TGetters>;
},
getPersistedSnapshot: (s) => s,
Expand Down

0 comments on commit 36cccf1

Please sign in to comment.