diff --git a/grai-frontend/src/helpers/useLocalState.ts b/grai-frontend/src/helpers/useLocalState.ts index 83fd17d45..c0f121bf5 100644 --- a/grai-frontend/src/helpers/useLocalState.ts +++ b/grai-frontend/src/helpers/useLocalState.ts @@ -16,7 +16,7 @@ export default function useLocalState( useEffect(() => { if (typeof window !== "undefined" && window.localStorage) { - value + value !== undefined && value !== null ? window.localStorage.setItem(key, JSON.stringify(value)) : window.localStorage.removeItem(key) }