Skip to content

Commit 51832d3

Browse files
committed
fix(util): fix crash, fixed #154
1 parent 25ccc79 commit 51832d3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/core/route/util.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,7 @@ export const getParentPath = cached(path => {
5454
})
5555

5656
export const cleanPath = cached(path => {
57-
return path.replace(/([^:])\/{2,}/g, '$1/')
57+
return path
58+
.replace(/^\/+/, '/')
59+
.replace(/([^:])\/{2,}/g, '$1/')
5860
})

0 commit comments

Comments
 (0)