From ee5f13cd03717f16ce33dadc0b33cc37ea49474e Mon Sep 17 00:00:00 2001 From: Saul-Mirone Date: Fri, 3 Jan 2025 09:55:00 +0000 Subject: [PATCH] fix(editor): surface ref find element error (#9508) --- .../block-surface-ref/src/surface-ref-block.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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