diff --git a/package.json b/package.json index 25faaab..de48017 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@panic/web-core", - "version": "0.1.4", + "version": "0.1.5", "license": "AGPL-3.0-only", "description": "Core auth and utilities for panic.haus web applications", "type": "module", diff --git a/src/panels/useSidePanelMachine.ts b/src/panels/useSidePanelMachine.ts index 6406283..488ea44 100644 --- a/src/panels/useSidePanelMachine.ts +++ b/src/panels/useSidePanelMachine.ts @@ -76,6 +76,10 @@ export function useSidePanelMachine({ } const storedValue = localStorage.getItem(storageKey); + if (storedValue == null || storedValue.trim() === '') { + return defaultWidth; + } + const parsed = Number(storedValue); if (!Number.isFinite(parsed)) { return defaultWidth;