Skip to content
Snippets Groups Projects
Unverified Commit f4277095 authored by Alexander Polyankin's avatar Alexander Polyankin Committed by GitHub
Browse files

Handle the session storage error when saving a location state (#25386)

parent 95e4a346
No related branches found
No related tags found
No related merge requests found
...@@ -199,10 +199,16 @@ export const updateUrl = createThunkAction( ...@@ -199,10 +199,16 @@ export const updateUrl = createThunkAction(
// this is necessary because we can't get the state from history.state // this is necessary because we can't get the state from history.state
dispatch(setCurrentState(newState)); dispatch(setCurrentState(newState));
if (replaceState) {
dispatch(replace(locationDescriptor)); try {
} else { if (replaceState) {
dispatch(push(locationDescriptor)); dispatch(replace(locationDescriptor));
} else {
dispatch(push(locationDescriptor));
}
} catch (e) {
// saving the location state can exceed the session storage quota (metabase#25312)
console.warn(e);
} }
}, },
); );
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment