diff --git a/src/create-matcher.js b/src/create-matcher.js index bb30f3971..3392b2c07 100644 --- a/src/create-matcher.js +++ b/src/create-matcher.js @@ -175,15 +175,16 @@ function matchRoute ( path: string, params: Object ): boolean { - let m try { - m = decodeURI(path).match(regex) + path = decodeURI(path) } catch (err) { if (process.env.NODE_ENV !== 'production') { warn(false, `Error decoding "${path}". Leaving it intact.`) } } + const m = path.match(regex) + if (!m) { return false } else if (!params) {