Skip to content

Commit 76c041a

Browse files
committed
fix(util): correctly clean up duplicate slashes, fixed #153
1 parent 2c277b8 commit 76c041a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/route/util.js

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

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

0 commit comments

Comments
 (0)