mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
fix: retrieve index
This commit is contained in:
@@ -7,7 +7,8 @@ export default function getAllPageIds (collectionQuery, collectionId, collection
|
||||
let pageIds = []
|
||||
try {
|
||||
if (viewIds && viewIds.length > 0) {
|
||||
const ids = collectionQuery[collectionId][viewIds[0]]?.collection_group_results?.blockIds
|
||||
const groupIndex = viewIds.length > 0 ? viewIds.length - 1 : 0
|
||||
const ids = collectionQuery[collectionId][viewIds[groupIndex]]?.collection_group_results?.blockIds
|
||||
for (const id of ids) {
|
||||
pageIds.push(id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user