We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aea8de4 commit 2bbb2b2Copy full SHA for 2bbb2b2
packages/shared/src/utils/resolveRoutePathFromUrl.ts
@@ -1,7 +1,7 @@
1
export const resolveRoutePathFromUrl = (url: string, base = '/'): string => {
2
const pathname = url
3
// remove url origin
4
- .replace(/^(https?:)?\/\/[^/]*/, '')
+ .replace(/^(?:https?:)?\/\/[^/]*/, '')
5
6
// remove site base
7
return pathname.startsWith(base)
0 commit comments