Skip to content

Commit 19cf05c

Browse files
committed
fix duplicate params key warning (fix #1365)
1 parent 00f4f43 commit 19cf05c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/create-route-map.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ function compileRouteRegex (path: string): RouteRegExp {
141141
if (process.env.NODE_ENV !== 'production') {
142142
const keys: any = {}
143143
regex.keys.forEach(key => {
144-
warn(!keys[key], `Duplicate param keys in route with path: "${path}"`)
145-
keys[key] = true
144+
warn(!keys[key.name], `Duplicate param keys in route with path: "${path}"`)
145+
keys[key.name] = true
146146
})
147147
}
148148
return regex

0 commit comments

Comments
 (0)