mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
fix(editor): block selection error when unloaded (#9511)
Closes: [BS-2305](https://linear.app/affine-design/issue/BS-2305/typeerror-thisblock-is-null)
This commit is contained in:
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user