Skip to content

Commit

Permalink
fix(post/toc): js toc error (#271)
Browse files Browse the repository at this point in the history
Closes #279
  • Loading branch information
yhliyr committed Sep 10, 2020
1 parent 7dfedd3 commit 708de67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/even.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Even._initToc = function() {
$($toclink).removeClass('active');
$($tocLinkLis).removeClass('has-active');

if (activeTocIndex !== -1) {
if (activeTocIndex !== -1 && $toclink[activeTocIndex] != null) {
$($toclink[activeTocIndex]).addClass('active');
let ancestor = $toclink[activeTocIndex].parentNode;
while (ancestor.tagName !== 'NAV') {
Expand Down

0 comments on commit 708de67

Please sign in to comment.