You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/matcher/index.ts
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -241,7 +241,7 @@ export function createRouterMatcher(
241
241
// this also allows the user to control the encoding
242
242
path=___location.path
243
243
244
-
if(__DEV__&&path[0]!=='/'){
244
+
if(__DEV__&&!path.startsWith('/')){
245
245
warn(
246
246
`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.`
247
247
)
@@ -252,6 +252,7 @@ export function createRouterMatcher(
252
252
253
253
if(matcher){
254
254
// TODO: dev warning of unused params if provided
255
+
// we know the matcher works because we tested the regexp
0 commit comments