mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 15:09:22 +00:00
Merge pull request #138 from yuzhanglong/patch-1
fix: fix build error for no title or description
This commit is contained in:
@@ -157,8 +157,8 @@ async function getBlogInfo ({ notionPageData, from }) {
|
||||
return null
|
||||
}
|
||||
const collection = notionPageData?.collection
|
||||
const title = collection?.name[0][0] || BLOG.TITLE
|
||||
const description = collection?.description[0][0] || BLOG.DESCRIPTION
|
||||
const title = collection?.name?.[0][0] || BLOG.TITLE
|
||||
const description = collection?.description?.[0][0] || BLOG.DESCRIPTION
|
||||
const pageCover = mapCoverUrl(collection?.cover, notionPageData.block)
|
||||
return { title, description, pageCover }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user