Skip to content

Commit

Permalink
fix: fix Sidebar link active logic (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
onevcat authored and yyx990803 committed Apr 23, 2018
1 parent bc2c83a commit 9c93d8f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/default-theme/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,7 @@ export function isActive (route, path) {
}
const routePath = normalize(route.path)
const pagePath = normalize(path)
if (endingSlashRE.test(routePath) || endingSlashRE.test(pagePath)) {
return routePath === pagePath
} else {
return routePath.indexOf(pagePath) === 0
}
return routePath === pagePath
}

export function resolvePage (pages, rawPath, base) {
Expand Down

0 comments on commit 9c93d8f

Please sign in to comment.