Skip to content

Commit d0ddfa3

Browse files
committed
refine
1 parent ba4ce81 commit d0ddfa3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
return;
2323
}
2424

25-
sessionStorage.removeItem("spa-redirect");
2625
const normalizedPath = storedPath.startsWith("/")
2726
? storedPath
2827
: `/${storedPath}`;
29-
const newUrl = window.location.origin + normalizedPath;
30-
window.history.replaceState(null, "", newUrl);
28+
window.history.replaceState(null, "", normalizedPath);
29+
sessionStorage.removeItem("spa-redirect");
30+
window.dispatchEvent(new Event("popstate"));
3131
})();
3232
</script>
3333
<script type="module" src="/src/main.jsx"></script>

0 commit comments

Comments
 (0)