mirror of
https://github.com/exogen/t2-mapper.git
synced 2026-01-19 20:25:01 +00:00
fall back to empty settings object
This commit is contained in:
parent
fc4146c824
commit
fefa01b6f9
|
|
@ -34,7 +34,7 @@ export function SettingsProvider({ children }: { children: React.ReactNode }) {
|
|||
useEffect(() => {
|
||||
let savedSettings: PersistedSettings = {};
|
||||
try {
|
||||
savedSettings = JSON.parse(localStorage.getItem("settings"));
|
||||
savedSettings = JSON.parse(localStorage.getItem("settings")) || {};
|
||||
} catch (err) {
|
||||
// Ignore.
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue