diff --git a/src/common/util.ts b/src/common/util.ts index 6b9e934e..f0d74582 100644 --- a/src/common/util.ts +++ b/src/common/util.ts @@ -48,7 +48,7 @@ export const resolveBase = (base?: string): string => { if (!base || base.startsWith("/")) { return base || "" } - const parts = location.pathname.replace(/^\//g, "").split("/") + const parts = location.pathname.split("/") parts[parts.length - 1] = base const url = new URL(location.origin + "/" + parts.join("/")) return normalize(url.pathname)