Skip to content

Commit 1cb2f88

Browse files
authored
fix: avoid hard reload of edit votes page (#5899)
1 parent aa3cfef commit 1cb2f88

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/plugins/router/nav-guards.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ function applyNetworkPathRedirects(router: Router): Router {
8989
if (networkFromPath) {
9090
const noNetworkChangeCallback = () => next();
9191
const networkChangeCallback = () => {
92+
/*
93+
Edge case:
94+
Clicking a pool link from the voting page changes networkId in localStorage so we have to ignore the hardRedirect to avoid losing the voting state
95+
(when navigating to Edit votes)
96+
*/
97+
if (to.fullPath === '/ethereum/vebal-voting') return next();
9298
hardRedirectTo(`/#${to.fullPath}`);
9399
};
94100

0 commit comments

Comments
 (0)