Skip to content

Commit

Permalink
fix(editor): block selection error when unloaded
Browse files Browse the repository at this point in the history
  • Loading branch information
Saul-Mirone committed Jan 3, 2025
1 parent cfd64f1 commit d727d1d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion blocksuite/affine/components/src/block-selection/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ export class BlockSelection extends SignalWatcher(LitElement) {

protected override updated(_changedProperties: PropertyValues): void {
super.updated(_changedProperties);
this.style.display = this.block.selected?.is('block') ? 'block' : 'none';
if (this.block) {
this.style.display = this.block.selected?.is('block') ? 'block' : 'none';
}
}

@property({ attribute: false })
Expand Down

0 comments on commit d727d1d

Please sign in to comment.