mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-22 23:16:48 +00:00
fix page-cover-missing
This commit is contained in:
@@ -273,10 +273,15 @@ async function getDataBaseInfoByNotionAPI({ pageId, from }) {
|
||||
|
||||
const viewIds = rawMetadata?.view_ids
|
||||
const collectionData = []
|
||||
|
||||
const pageIds = getAllPageIds(collectionQuery, collectionId, collectionView, viewIds)
|
||||
if (pageIds?.length === 0) {
|
||||
console.error('获取到的文章列表为空,请检查notion模板', collectionQuery, collection, collectionView, viewIds, pageRecordMap)
|
||||
} else {
|
||||
console.log('有效Page数量', pageIds?.length)
|
||||
}
|
||||
|
||||
// 获取每篇文章基础数据
|
||||
for (let i = 0; i < pageIds.length; i++) {
|
||||
const id = pageIds[i]
|
||||
const value = block[id]?.value
|
||||
@@ -291,7 +296,8 @@ async function getDataBaseInfoByNotionAPI({ pageId, from }) {
|
||||
}
|
||||
continue
|
||||
}
|
||||
const properties = (await getPageProperties(id, block[id].value, schema, null, getTagOptions(schema))) || null
|
||||
|
||||
const properties = (await getPageProperties(id, value, schema, null, getTagOptions(schema))) || null
|
||||
if (properties) {
|
||||
collectionData.push(properties)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user