Logging: add warning log for exception during local storage parsing
This commit is contained in:
parent
90d7b52987
commit
dc3c1985b5
|
@ -9,7 +9,7 @@ export const loadState = () => {
|
|||
}
|
||||
return JSON.parse(serializedState);
|
||||
} catch (err) {
|
||||
// TODO - log warning? or bubble?
|
||||
console.warn(' Warning: corrupted local storage');
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -18,7 +18,7 @@ export const saveState = (state: Object) => {
|
|||
const serializedState = JSON.stringify(state);
|
||||
localStorage.setItem(REDUX_STATE, serializedState);
|
||||
} catch (err) {
|
||||
// TODO - log warning? or bubble?
|
||||
console.warn(' Warning: corrupted local storage');
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue