Skip to content

Commit 0febc05

Browse files
committed
chore: todos
1 parent 58b4f42 commit 0febc05

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

__tests__/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export function createDom(options?: ConstructorOptions) {
103103
}
104104
)
105105

106-
// @ts-ignore: TODO: remove this line then?
106+
// @ts-ignore: needed for jsdom
107107
global.window = dom.window
108108
global.___location = dom.window.___location
109109
global.history = dom.window.history

src/matcher/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ export function createRouterMatcher(
241241
// this also allows the user to control the encoding
242242
path = ___location.path
243243

244-
if (__DEV__ && path[0] !== '/') {
244+
if (__DEV__ && !path.startsWith('/')) {
245245
warn(
246246
`The Matcher cannot resolve relative paths but received "${path}". Unless you directly called \`matcher.resolve("${path}")\`, this is probably a bug in vue-router. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/vue-router-next.`
247247
)
@@ -252,6 +252,7 @@ export function createRouterMatcher(
252252

253253
if (matcher) {
254254
// TODO: dev warning of unused params if provided
255+
// we know the matcher works because we tested the regexp
255256
params = matcher.parse(path)!
256257
name = matcher.record.name
257258
}

0 commit comments

Comments
 (0)