Skip to content

Commit

Permalink
fix($plugin-active-header-links): side navigation edge case bug (#1477)
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleJShaver authored and ulivz committed Mar 27, 2019
1 parent d34e038 commit 8a11d14
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down

0 comments on commit 8a11d14

Please sign in to comment.