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 447459f commit d0f9146Copy full SHA for d0f9146
src/routes/page.ts
@@ -22,9 +22,12 @@ export async function pageRoute(req: HandlerRequest) {
22
const block = allBlocks[blockId];
23
const content = block.value && block.value.content;
24
25
- return content && block.value.type !== "page"
26
- ? content.filter((id: string) => !allBlocks[id])
27
- : [];
+ if (!content || (block.value.type === "page" && blockId !== pageId!)) {
+ // skips pages other than the requested page
+ return [];
28
+ }
29
+
30
+ return content.filter((id: string) => !allBlocks[id]);
31
});
32
33
if (!pendingBlocks.length) {
0 commit comments