diff --git a/src/plugins/vis_builder/public/application/utils/state_management/redux_persistence.ts b/src/plugins/vis_builder/public/application/utils/state_management/redux_persistence.ts index 5a74f1110919..295d3e2b4478 100644 --- a/src/plugins/vis_builder/public/application/utils/state_management/redux_persistence.ts +++ b/src/plugins/vis_builder/public/application/utils/state_management/redux_persistence.ts @@ -10,13 +10,14 @@ import { RootState } from './store'; export const loadReduxState = async (services: VisBuilderServices) => { try { const serializedState = services.osdUrlStateStorage.get('_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 = (