fix ShowToc true but no toc is generated

This commit is contained in:
Reorx 2022-06-01 16:07:37 +08:00
parent ef40815528
commit 82a79a8354
1 changed files with 4 additions and 0 deletions

View File

@ -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