From 34d127254af8e89632d1bc14c607051c39189769 Mon Sep 17 00:00:00 2001 From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com> Date: Tue, 21 Jan 2025 13:00:01 +0100 Subject: [PATCH] fix synced ref resets empty values --- client/src/composables/persistentRef.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/composables/persistentRef.ts b/client/src/composables/persistentRef.ts index ab511f74caaa..3411f626037e 100644 --- a/client/src/composables/persistentRef.ts +++ b/client/src/composables/persistentRef.ts @@ -32,7 +32,7 @@ export function syncRefToLocalStorage(key: string, refToSync: Ref) { window.localStorage.setItem(key, stringified); }; - if (stored) { + if (stored !== null) { try { refToSync.value = parse(stored, typeof refToSync.value as "string" | "number" | "boolean" | "object"); } catch (e) {