From: Eduardo San Martin Morote Date: Tue, 4 Aug 2020 14:22:58 +0000 (+0200) Subject: chore: add todo about optional params X-Git-Tag: v4.0.0-beta.6~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=daf718f4594a9f359488481aa526c5f7638eb7fd;p=thirdparty%2Fvuejs%2Frouter.git chore: add todo about optional params --- diff --git a/src/matcher/index.ts b/src/matcher/index.ts index 7111a18d..1bb7b07a 100644 --- a/src/matcher/index.ts +++ b/src/matcher/index.ts @@ -228,6 +228,8 @@ export function createRouterMatcher( // paramsFromLocation is a new object paramsFromLocation( currentLocation.params, + // only keep params that exist in the resolved location + // TODO: only keep optional params coming from a parent record matcher.keys.map(k => k.name) ), location.params