Skip to content

Commit 7b34c16

Browse files
🌓
1 parent a312deb commit 7b34c16

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/notion.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const getNavigationLinkPages = pMemoize(
2424
navigationLinkPageIds,
2525
async (navigationLinkPageId) =>
2626
notion.getPage(navigationLinkPageId, {
27+
chunkLimit: 1,
2728
fetchMissingBlocks: false,
2829
fetchCollections: false,
2930
signFileUrls: false
@@ -47,12 +48,17 @@ export async function getPage(pageId: string): Promise<ExtendedRecordMap> {
4748
// the page title, slug, etc.
4849
const navigationLinkRecordMaps = await getNavigationLinkPages()
4950

51+
const preLength = Object.keys(recordMap.block).length
5052
if (navigationLinkRecordMaps?.length) {
5153
recordMap = navigationLinkRecordMaps.reduce(
5254
(map, navigationLinkRecordMap) =>
5355
mergeRecordMaps(map, navigationLinkRecordMap),
5456
recordMap
5557
)
58+
59+
const postLength = Object.keys(recordMap.block).length
60+
61+
console.log('BLOCKS', { preLength, postLength })
5662
}
5763
}
5864

0 commit comments

Comments
 (0)