Skip to content

Commit 443e10a

Browse files
committed
fix the bug of traversing no pages of collections
1 parent 576d803 commit 443e10a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/notion-utils/src/get-all-pages-in-space.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ export async function getAllPagesInSpace(
108108
page.collection_query
109109
)) {
110110
for (const collectionData of Object.values(collectionViews)) {
111-
const { blockIds } = collectionData
112-
111+
const { blockIds } =
112+
collectionData?.collection_group_results || {}
113113
if (blockIds) {
114114
for (const collectionItemId of blockIds) {
115115
void processPage(collectionItemId, depth + 1)

0 commit comments

Comments
 (0)