Skip to content

Commit

Permalink
Fix bug affecting calls to useStore with no params
Browse files Browse the repository at this point in the history
  • Loading branch information
Merlin04 committed Jan 9, 2023
1 parent 6b68093 commit 1deb8b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const createState = <T extends object>(initialValue: T): [

return [
(keys) => {
if(keys) {
if(keys !== null) {
const rerender = useRerender();
useReceiver((changed) => {
if(!keys || changed.some(k => keys.includes(k))) {
Expand Down Expand Up @@ -56,4 +56,4 @@ export const createState = <T extends object>(initialValue: T): [
},
() => db
];
};
};

0 comments on commit 1deb8b5

Please sign in to comment.