diff --git a/packages/store/src/index.ts b/packages/store/src/index.ts index 52e53ab..7c03d52 100644 --- a/packages/store/src/index.ts +++ b/packages/store/src/index.ts @@ -19,7 +19,7 @@ import type {Filter, TrustedEvent} from "@welshman/util" export const synced = (key: string, defaultValue: T) => { const init = getJson(key) - const store = writable(init === null ? defaultValue : init) + const store = writable(init === undefined ? defaultValue : init) store.subscribe((value: T) => setJson(key, value))