fix-build

This commit is contained in:
tangly1024.com
2023-03-24 13:40:20 +08:00
parent f841e7b3e1
commit dfb642e187

View File

@@ -220,13 +220,14 @@ async function getPageRecordMapByNotionAPI({ pageId, from }) {
// 文章计数
let postCount = 0
// 查找所有的Post和Page
const allPages = collectionData.filter(post => {
if (post.type === BLOG.NOTION_PROPERTY_NAME.type_post && post.status === BLOG.NOTION_PROPERTY_NAME.status_publish) {
postCount++
}
return post &&
(!post?.slug?.startsWith('http')) &&
(post?.status === BLOG.NOTION_PROPERTY_NAME.status_publish || post?.status === BLOG.NOTION_PROPERTY_NAME.status_invisible)
return post && post?.slug &&
(!post?.slug?.startsWith('http')) &&
(post?.status === BLOG.NOTION_PROPERTY_NAME.status_publish || post?.status === BLOG.NOTION_PROPERTY_NAME.status_invisible)
})
// Sort by date