Logging: add warning log for exception during local storage parsing

This commit is contained in:
Daniel Ternyak 2017-07-05 17:35:53 -05:00
parent 90d7b52987
commit dc3c1985b5
1 changed files with 2 additions and 2 deletions

View File

@ -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');
}
};