diff --git a/src/hooks/useSettingsState.ts b/src/hooks/useSettingsState.ts index 4f755205..5f0c823c 100644 --- a/src/hooks/useSettingsState.ts +++ b/src/hooks/useSettingsState.ts @@ -24,7 +24,7 @@ export function useDerived( const setter = useCallback>>( (inp) => { if (!(inp instanceof Function)) setOverwrite(inp); - else setOverwrite((s) => inp(s ?? initial)); + else setOverwrite((s) => inp(s !== undefined ? s : initial)); }, [initial, setOverwrite] );