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 882d36e commit 447459fCopy full SHA for 447459f
src/routes/page.ts
@@ -16,11 +16,15 @@ export async function pageRoute(req: HandlerRequest) {
16
let allBlockKeys;
17
18
while (true) {
19
+ allBlockKeys = Object.keys(allBlocks);
20
- allBlockKeys = allBlocks[pageId!].value.content
21
+ const pendingBlocks = allBlockKeys.flatMap((blockId) => {
22
+ const block = allBlocks[blockId];
23
+ const content = block.value && block.value.content;
24
- const pendingBlocks = allBlockKeys!.filter((blockId) => {
- return !allBlocks.hasOwnProperty(blockId)
25
+ return content && block.value.type !== "page"
26
+ ? content.filter((id: string) => !allBlocks[id])
27
+ : [];
28
});
29
30
if (!pendingBlocks.length) {
0 commit comments