diff options
author | yhliyr <lokidri@outlook.com> | 2020-09-11 00:08:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-11 00:08:59 +0800 |
commit | 708de67fd6a87ccf9b00d6626a18d135d38ca2e1 (patch) | |
tree | 46764c16603ba5250ae1bdb6b10ae0ee50ad2e4a /assets/js | |
parent | 7dfedd34404ad18fab9027bf04bab9a0b72f5ffd (diff) |
fix(post/toc): js toc error (#271)
Closes #279
Diffstat (limited to 'assets/js')
-rw-r--r-- | assets/js/even.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/assets/js/even.js b/assets/js/even.js index 7fe78c4..f6c6f1c 100644 --- a/assets/js/even.js +++ b/assets/js/even.js @@ -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') { |