diff --git a/src/core/route/util.js b/src/core/route/util.js index e8cac6324..38275f82b 100644 --- a/src/core/route/util.js +++ b/src/core/route/util.js @@ -54,5 +54,7 @@ export const getParentPath = cached(path => { }) export const cleanPath = cached(path => { - return path.replace(/([^:])\/{2,}/g, '$1/') + return path + .replace(/^\/+/, '/') + .replace(/([^:])\/{2,}/g, '$1/') })