From 03b138cfa4f32e982b617192f0d94d262f3b4770 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Sat, 6 May 2023 14:10:28 +0800 Subject: [PATCH] fix/database category parent_id --- pages/[...slug].js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/[...slug].js b/pages/[...slug].js index d51ef3ef..846ff7eb 100644 --- a/pages/[...slug].js +++ b/pages/[...slug].js @@ -31,7 +31,7 @@ const Slug = props => { setLock(true) } else { if (!lock && post?.blockMap?.block) { - post.content = Object.keys(post.blockMap.block).filter(key => post.blockMap.block[key]?.value.parent_id === post.id) + post.content = Object.keys(post.blockMap.block).filter(key => post.blockMap.block[key]?.value?.parent_id === post.id) post.toc = getPageTableOfContents(post, post.blockMap) }