Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

feat: insert page into workspace block

DarkSkyfcf699511e7c
diff --git a/libs/datasource/jwt/src/index.ts b/libs/datasource/jwt/src/index.ts
index c8d868cff7..16bbf5a8c4 100644
--- a/libs/datasource/jwt/src/index.ts
+++ b/libs/datasource/jwt/src/index.ts
@@ -541,6 +541,10 @@ export class BlockClient<
this.set_page(abstract_block);
});
this.#block_caches.set(abstract_block.id, abstract_block);
+
+ if (root && abstract_block.flavor === BlockFlavors.page) {
+ root.insertChildren(abstract_block);
+ }
return abstract_block;
}
}