mirror of
https://github.com/exogen/t2-mapper.git
synced 2026-07-15 08:24:51 +00:00
fall back to empty settings object
This commit is contained in:
parent
fc4146c824
commit
fefa01b6f9
1 changed files with 1 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ export function SettingsProvider({ children }: { children: React.ReactNode }) {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let savedSettings: PersistedSettings = {};
|
let savedSettings: PersistedSettings = {};
|
||||||
try {
|
try {
|
||||||
savedSettings = JSON.parse(localStorage.getItem("settings"));
|
savedSettings = JSON.parse(localStorage.getItem("settings")) || {};
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// Ignore.
|
// Ignore.
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue