Skip to content

Commit

Permalink
refactor(match): remove useless if statement (#2781)
Browse files Browse the repository at this point in the history
  • Loading branch information
liyangworld authored and posva committed May 22, 2019
1 parent 8ac478f commit 9b01cbc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/create-matcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ export function createMatcher (
}
}

if (record) {
location.path = fillParams(record.path, location.params, `named route "${name}"`)
return _createRoute(record, location, redirectedFrom)
}
location.path = fillParams(record.path, location.params, `named route "${name}"`)
return _createRoute(record, location, redirectedFrom)
} else if (location.path) {
location.params = {}
for (let i = 0; i < pathList.length; i++) {
Expand Down

0 comments on commit 9b01cbc

Please sign in to comment.