fix sidebar width, v0.1.5
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
2026-02-24 11:02:17 +01:00
parent 62590c34d1
commit 7e938138ff
2 changed files with 5 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "@panic/web-core", "name": "@panic/web-core",
"version": "0.1.4", "version": "0.1.5",
"license": "AGPL-3.0-only", "license": "AGPL-3.0-only",
"description": "Core auth and utilities for panic.haus web applications", "description": "Core auth and utilities for panic.haus web applications",
"type": "module", "type": "module",

View File

@@ -76,6 +76,10 @@ export function useSidePanelMachine({
} }
const storedValue = localStorage.getItem(storageKey); const storedValue = localStorage.getItem(storageKey);
if (storedValue == null || storedValue.trim() === '') {
return defaultWidth;
}
const parsed = Number(storedValue); const parsed = Number(storedValue);
if (!Number.isFinite(parsed)) { if (!Number.isFinite(parsed)) {
return defaultWidth; return defaultWidth;