修复单页嵌套无法打开的问题

This commit is contained in:
tangly1024
2023-08-01 22:33:23 +08:00
parent b1395e6668
commit 952fb4e66c
2 changed files with 2 additions and 3 deletions

View File

@@ -111,13 +111,12 @@ export async function getStaticProps({ params: { prefix } }) {
// 处理非列表内文章的内信息
if (!props?.post) {
const pageId = prefix.slice(-1)[0]
const pageId = prefix
if (pageId.length >= 32) {
const post = await getNotion(pageId)
props.post = post
}
}
// 无法获取文章
if (!props?.post) {
props.post = null