Skip to content

Commit

Permalink
Merge 9026a98 into aea8de4
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Apr 15, 2024
2 parents aea8de4 + 9026a98 commit 8834c37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/shared/src/utils/resolveRoutePathFromUrl.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const resolveRoutePathFromUrl = (url: string, base = '/'): string => {
const pathname = url
// remove url origin
.replace(/^(https?:)?\/\/[^/]*/, '')
.replace(/^(?:https?:)?\/\/[^/]*/, '')

// remove site base
return pathname.startsWith(base)
Expand Down

0 comments on commit 8834c37

Please sign in to comment.