Skip to content

Commit

Permalink
fix: default matcher options
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Apr 29, 2020
1 parent 3c14b44 commit cea397b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/matcher/index.ts
Expand Up @@ -12,6 +12,7 @@ import {
PathParams,
comparePathParserScore,
PathParserOptions,
PathParserOptionsPublic,
} from './pathParserRanker'
import { warn } from 'vue'

Expand All @@ -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)
Expand Down Expand Up @@ -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 }

0 comments on commit cea397b

Please sign in to comment.