mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-03 15:10:19 +00:00
fix: retrieve index
This commit is contained in:
@@ -7,7 +7,8 @@ export default function getAllPageIds (collectionQuery, collectionId, collection
|
|||||||
let pageIds = []
|
let pageIds = []
|
||||||
try {
|
try {
|
||||||
if (viewIds && viewIds.length > 0) {
|
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) {
|
for (const id of ids) {
|
||||||
pageIds.push(id)
|
pageIds.push(id)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user