fix only display toc of current page

This commit is contained in:
RedhairHambagu
2023-04-24 21:35:27 +08:00
committed by GitHub
parent 08a91b3dfe
commit 2db4816eea

View File

@@ -31,7 +31,7 @@ const Slug = props => {
setLock(true)
} else {
if (!lock && post?.blockMap?.block) {
post.content = Object.keys(post.blockMap.block)
post.content = Object.keys(post.blockMap.block).filter(key => post.blockMap.block[key]?.value.parent_id === post.id)
post.toc = getPageTableOfContents(post, post.blockMap)
}