Skip to content

Commit 9b01cbc

Browse files
liyangworldposva
authored andcommitted
refactor(match): remove useless if statement (#2781)
1 parent 8ac478f commit 9b01cbc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/create-matcher.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,8 @@ export function createMatcher (
5353
}
5454
}
5555

56-
if (record) {
57-
location.path = fillParams(record.path, location.params, `named route "${name}"`)
58-
return _createRoute(record, location, redirectedFrom)
59-
}
56+
location.path = fillParams(record.path, location.params, `named route "${name}"`)
57+
return _createRoute(record, location, redirectedFrom)
6058
} else if (location.path) {
6159
location.params = {}
6260
for (let i = 0; i < pathList.length; i++) {

0 commit comments

Comments
 (0)