Skip to content

Commit

Permalink
Console log the error
Browse files Browse the repository at this point in the history
Signed-off-by: abbyhu2000 <[email protected]>
  • Loading branch information
abbyhu2000 committed Dec 16, 2022
1 parent e350c0e commit d169538
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ import { RootState } from './store';
export const loadReduxState = async (services: VisBuilderServices) => {
try {
const serializedState = services.osdUrlStateStorage.get<RootState>('_a');
if (serializedState === null) {
return await getPreloadedState(services);
}
return serializedState;
if (serializedState !== null) return serializedState;
} catch (err) {
return await getPreloadedState(services);
/* eslint-disable no-console */
console.error(err);
/* eslint-enable no-console */
}

return await getPreloadedState(services);
};

export const saveReduxState = (
Expand Down

0 comments on commit d169538

Please sign in to comment.