Skip to content

Commit

Permalink
fix: removes warning resolving asterisk routes
Browse files Browse the repository at this point in the history
Closes #2505
  • Loading branch information
clarkdo authored and posva committed Dec 22, 2018
1 parent 32ad6da commit bbfb889
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/util/params.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,18 @@ export function fillParams (
const filler =
regexpCompileCache[path] ||
(regexpCompileCache[path] = Regexp.compile(path))
if (params && params.pathMatch) {
params[0] = params.pathMatch
}
return filler(params || {}, { pretty: true })
} catch (e) {
if (process.env.NODE_ENV !== 'production') {
warn(false, `missing param for ${routeMsg}: ${e.message}`)
}
return ''
} finally {
if (params && params[0]) {
delete params[0]
}
}
}

0 comments on commit bbfb889

Please sign in to comment.