]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
fix: default matcher options
authorEduardo San Martin Morote <posva13@gmail.com>
Wed, 29 Apr 2020 17:00:42 +0000 (19:00 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Wed, 29 Apr 2020 17:00:42 +0000 (19:00 +0200)
src/matcher/index.ts

index 86acf567fe4e35fe895914c9a2a4f4c653aea31b..bd6db66dbca59034aa08db78b72ae7a81443902c 100644 (file)
@@ -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<RouteRecordName, RouteRecordMatcher>()
+  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<T>(defaults: T, partialOptions: Partial<T>): T {
   return options
 }
 
-export { PathParserOptionsPublic as PathParserOptions } from './pathParserRanker'
+export { PathParserOptionsPublic as PathParserOptions }