From: Eduardo San Martin Morote Date: Wed, 29 Apr 2020 17:00:42 +0000 (+0200) Subject: fix: default matcher options X-Git-Tag: v4.0.0-alpha.8~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cea397b7402cd27ff06013f846bf35966aff6952;p=thirdparty%2Fvuejs%2Frouter.git fix: default matcher options --- diff --git a/src/matcher/index.ts b/src/matcher/index.ts index 86acf567..bd6db66d 100644 --- a/src/matcher/index.ts +++ b/src/matcher/index.ts @@ -12,6 +12,7 @@ import { PathParams, comparePathParserScore, PathParserOptions, + PathParserOptionsPublic, } from './pathParserRanker' import { warn } from 'vue' @@ -38,6 +39,10 @@ export function createRouterMatcher( // normalized ordered array of matchers const matchers: RouteRecordMatcher[] = [] const matcherMap = new Map() + globalOptions = mergeOptions( + { strict: false, end: true, sensitive: false } as PathParserOptionsPublic, + globalOptions + ) function getRecordMatcher(name: RouteRecordName) { return matcherMap.get(name) @@ -357,4 +362,4 @@ function mergeOptions(defaults: T, partialOptions: Partial): T { return options } -export { PathParserOptionsPublic as PathParserOptions } from './pathParserRanker' +export { PathParserOptionsPublic as PathParserOptions }