提交 8a11d145 编写于 作者: K Kyle Shaver 提交者: ULIVZ

fix($plugin-active-header-links): side navigation edge case bug (#1477)

上级 d34e0389
......@@ -40,12 +40,12 @@ export default {
const routeHash = decodeURIComponent(this.$route.hash)
if (isActive && routeHash !== decodeURIComponent(anchor.hash)) {
let activeAnchor = anchor
const activeAnchor = anchor
// check if anchor is at the bottom of the page to keep $route.hash consistent
if (bottomY === scrollHeight) {
for (let j = i + 1; j < anchors.length; j++) {
if (routeHash === decodeURIComponent(anchors[j].hash)) {
activeAnchor = anchors[j]
return
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册