We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64d8727 commit 2fd43bdCopy full SHA for 2fd43bd
packages/notion-utils/src/get-all-pages-in-space.ts
@@ -112,11 +112,11 @@ export async function getAllPagesInSpace(
112
new Set([
113
...(collectionData?.collection_group_results?.blockIds ||
114
[]),
115
- ...collectionData.blockIds
+ ...(collectionData.blockIds || [])
116
])
117
)
118
119
- if (blockIds) {
+ if (blockIds.length) {
120
for (const collectionItemId of blockIds) {
121
void processPage(collectionItemId, depth + 1)
122
}
0 commit comments