From 76c041ad48cd4edc73d7114a80e9c2b85fddee52 Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Fri, 28 Apr 2017 08:02:54 +0800 Subject: [PATCH] fix(util): correctly clean up duplicate slashes, fixed #153 --- src/core/route/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/route/util.js b/src/core/route/util.js index cfdd2a9..e8cac63 100644 --- a/src/core/route/util.js +++ b/src/core/route/util.js @@ -54,5 +54,5 @@ export const getParentPath = cached(path => { }) export const cleanPath = cached(path => { - return path.replace(/\/+/g, '/') + return path.replace(/([^:])\/{2,}/g, '$1/') })