mirror of
https://github.com/zhigang1992/notion-api-worker.git
synced 2026-01-12 17:32:42 +08:00
fix: some blocks don't have value attribute
This commit is contained in:
@@ -52,7 +52,7 @@ export async function pageRoute(req: HandlerRequest) {
|
||||
const pendingCollections = allBlockKeys.flatMap((blockId) => {
|
||||
const block = allBlocks[blockId];
|
||||
|
||||
return block.value.type === "collection_view" ? [block.value.id] : [];
|
||||
return (block.value && block.value.type === "collection_view") ? [block.value.id] : [];
|
||||
});
|
||||
|
||||
for (let b of pendingCollections) {
|
||||
|
||||
Reference in New Issue
Block a user