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.

fix(core): override LinkedDocBlockComponent initial state (#8253)

fundonbba9e79e5940
diff --git a/packages/frontend/core/src/components/blocksuite/block-suite-editor/specs/custom/spec-patchers.tsx b/packages/frontend/core/src/components/blocksuite/block-suite-editor/specs/custom/spec-patchers.tsx
index 2d8ffbe559..3a136d288b 100644
--- a/packages/frontend/core/src/components/blocksuite/block-suite-editor/specs/custom/spec-patchers.tsx
+++ b/packages/frontend/core/src/components/blocksuite/block-suite-editor/specs/custom/spec-patchers.tsx
@@ -484,10 +484,12 @@ export function patchEdgelessClipboard() {
}
@customElement('affine-linked-doc-ref-block')
-// @ts-expect-error ignore private warning for overriding _load
export class LinkedDocBlockComponent extends EmbedLinkedDocBlockComponent {
- override async _load() {
- this.isBannerEmpty = true;
+ override getInitialState() {
+ return {
+ loading: false,
+ isBannerEmpty: true,
+ };
}
}