diff --git a/blocksuite/affine/block-surface-ref/src/surface-ref-block.ts b/blocksuite/affine/block-surface-ref/src/surface-ref-block.ts index 0926031b67f27..4743d6233d028 100644 --- a/blocksuite/affine/block-surface-ref/src/surface-ref-block.ts +++ b/blocksuite/affine/block-surface-ref/src/surface-ref-block.ts @@ -341,7 +341,7 @@ export class SurfaceRefBlockComponent extends BlockComponent doc.getBlock(this.model.reference) || - getSurfaceBlock(doc)!.getElementById(this.model.reference) + getSurfaceBlock(doc)?.getElementById(this.model.reference) ); if (doc) { @@ -355,11 +355,11 @@ export class SurfaceRefBlockComponent extends BlockComponent