Skip to content

Commit

Permalink
fix redirect state error
Browse files Browse the repository at this point in the history
  • Loading branch information
vincerubinetti committed Aug 16, 2024
1 parent f015290 commit 4f376a9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion frontend/public/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
console.debug("With state:", history.state);
const { origin, pathname, search, hash } = location;
sessionStorage.redirectPath = pathname + search + hash;
sessionStorage.redirectState = JSON.stringify(history.state);
try {
// remove entries that could exceed storage limit
delete history.state.usr.results;
sessionStorage.redirectState = JSON.stringify(history.state);
} catch (error) {
console.error(error);
}
location = "/";
</script>
</body>
Expand Down

0 comments on commit 4f376a9

Please sign in to comment.