Skip to content

Commit 9c93d8f

Browse files
onevcatyyx990803
authored andcommitted
fix: fix Sidebar link active logic (#215)
1 parent bc2c83a commit 9c93d8f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/default-theme/util.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,7 @@ export function isActive (route, path) {
4646
}
4747
const routePath = normalize(route.path)
4848
const pagePath = normalize(path)
49-
if (endingSlashRE.test(routePath) || endingSlashRE.test(pagePath)) {
50-
return routePath === pagePath
51-
} else {
52-
return routePath.indexOf(pagePath) === 0
53-
}
49+
return routePath === pagePath
5450
}
5551

5652
export function resolvePage (pages, rawPath, base) {

0 commit comments

Comments
 (0)