Skip to content

Commit bbfb889

Browse files
clarkdoposva
authored andcommitted
fix: removes warning resolving asterisk routes
Closes #2505
1 parent 32ad6da commit bbfb889

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: src/util/params.js

+7
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,18 @@ export function fillParams (
1717
const filler =
1818
regexpCompileCache[path] ||
1919
(regexpCompileCache[path] = Regexp.compile(path))
20+
if (params && params.pathMatch) {
21+
params[0] = params.pathMatch
22+
}
2023
return filler(params || {}, { pretty: true })
2124
} catch (e) {
2225
if (process.env.NODE_ENV !== 'production') {
2326
warn(false, `missing param for ${routeMsg}: ${e.message}`)
2427
}
2528
return ''
29+
} finally {
30+
if (params && params[0]) {
31+
delete params[0]
32+
}
2633
}
2734
}

0 commit comments

Comments
 (0)