diff --git a/src/core/route/util.js b/src/core/route/util.js index e8cac63..38275f8 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/') })