Skip to content

Commit

Permalink
fix: Prevents Proxy startup error
Browse files Browse the repository at this point in the history
  • Loading branch information
MatiasWorker committed Apr 24, 2024
1 parent 0edbdfa commit 5d4b13f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ export const useProviderStore = <
);

useMemo(() => {
Object.assign(store.state, state);
try {
// Prevents Proxy startup error
Object.assign(store.state, state);
} catch {}
}, memo || []);

useInsertionEffect(() => store.subscribe(dispatch), [store]);
Expand Down

0 comments on commit 5d4b13f

Please sign in to comment.