diff --git a/src/extra/route.ts b/src/extra/route.ts index 4168f2c..fea1472 100644 --- a/src/extra/route.ts +++ b/src/extra/route.ts @@ -66,8 +66,9 @@ const _options = { */ function normalizePath(path: string, removeQuery?: boolean) { + path = path.replace(window.location.protocol + '//', '') + path = path.replace(window.location.host, '') path = path.replace(_options.base, '') - path = path.replace(window.location.origin, '') path = path.replace('/?', '?') path = path.replace(new RegExp('[/]*$'), '') path = path.replace(new RegExp('^[/]*'), '')