fix gitbook & mermaid

This commit is contained in:
tangly1024
2023-06-24 21:08:26 +08:00
parent ffc3fb984b
commit e0b9f33bbe
2 changed files with 5 additions and 4 deletions

View File

@@ -50,7 +50,6 @@ const Catalog = ({ post }) => {
setActiveSection(currentSectionId)
const index = tocIds.indexOf(currentSectionId) || 0
if (isBrowser() && tocIds?.length > 0) {
console.log(28 * index, index, currentSectionId)
for (const tocWrapper of document?.getElementsByClassName('toc-wrapper')) {
tocWrapper?.scrollTo({ top: 28 * index, behavior: 'smooth' })
}