diff options
| author | Reorx <novoreorx@gmail.com> | 2022-06-01 16:07:37 +0800 |
|---|---|---|
| committer | Reorx <novoreorx@gmail.com> | 2022-06-01 16:07:37 +0800 |
| commit | 82a79a8354a2b9a84dc14e9f50963e313e488cd8 (patch) | |
| tree | 75bf14b6b0db996b618127d44b2efb394cc6b63b | |
| parent | ef408155287eadd32ba208bb7ff3d5d5b04ebf9c (diff) | |
fix ShowToc true but no toc is generated
| -rw-r--r-- | layouts/partials/page_footer.html | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/layouts/partials/page_footer.html b/layouts/partials/page_footer.html index 24ce455..1ad0e41 100644 --- a/layouts/partials/page_footer.html +++ b/layouts/partials/page_footer.html @@ -60,6 +60,10 @@ if (!enableTocScroll) { return } + if (!document.querySelector('.toc')) { + console.log('no toc found, ignore toc scroll') + return + } // console.log('enable toc scroll') // always get an array here |
