Fix going to /web and getting redirected to /web/web
This commit is contained in:
parent
8787d83268
commit
edf4b33eac
2 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ function main() {
|
|||
if (window.history && history.replaceState) {
|
||||
const { pathname, search, hash } = window.location;
|
||||
const path = pathname + search + hash;
|
||||
if (!(/^\/web[$/]/).test(path)) {
|
||||
if (!(/^\/web($|\/)/).test(path)) {
|
||||
history.replaceState(null, document.title, `/web${path}`);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ function main() {
|
|||
if (window.history && history.replaceState) {
|
||||
const { pathname, search, hash } = window.location;
|
||||
const path = pathname + search + hash;
|
||||
if (!(/^\/web[$/]/).test(path)) {
|
||||
if (!(/^\/web($|\/)/).test(path)) {
|
||||
history.replaceState(null, document.title, `/web${path}`);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue