From 50f91298e1e9adef42dae309649ca7f499180c96 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Wed, 29 Jan 2025 08:54:41 -0800 Subject: [PATCH] Fix get json default --- packages/store/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))