mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-13 12:54:59 +08:00
fix(editor): block can be null in widget (#10959)
Closes: [BS-2826](https://linear.app/affine-design/issue/BS-2826/typeerror-thisblock-is-null)
This commit is contained in:
@@ -105,7 +105,7 @@ export class AffineSlashMenuWidget extends WidgetComponent {
|
||||
}
|
||||
};
|
||||
|
||||
if (this.block.model.flavour !== 'affine:page') {
|
||||
if (this.block?.model.flavour !== 'affine:page') {
|
||||
console.error('SlashMenuWidget should be used in RootBlock');
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user