From 1deb8b5e10052a9724576dd114c2adbe9fd0dc49 Mon Sep 17 00:00:00 2001 From: Merlin04 Date: Sun, 8 Jan 2023 22:37:49 -0800 Subject: [PATCH] Fix bug affecting calls to useStore with no params --- src/state.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/state.ts b/src/state.ts index 51a4b23..7e74ba5 100644 --- a/src/state.ts +++ b/src/state.ts @@ -16,7 +16,7 @@ export const createState = (initialValue: T): [ return [ (keys) => { - if(keys) { + if(keys !== null) { const rerender = useRerender(); useReceiver((changed) => { if(!keys || changed.some(k => keys.includes(k))) { @@ -56,4 +56,4 @@ export const createState = (initialValue: T): [ }, () => db ]; -}; \ No newline at end of file +};