This commit is contained in:
tangly1024.com
2023-06-07 15:44:26 +08:00
parent 00d32c81e0
commit d98d1f4c4b
4 changed files with 4 additions and 4 deletions

View File

@@ -126,7 +126,7 @@ export async function getStaticProps({ params: { slug } }) {
const from = `slug-props-${fullSlug}`
const props = await getGlobalNotionData({ from })
// 在列表内查找文章
props.post = props.allPages.find((p) => {
props.post = props?.allPages?.find((p) => {
return p.slug === fullSlug || p.id === idToUuid(fullSlug)
})