From a28b8b1b115e1df0721c6c5b2554c92420483b1b Mon Sep 17 00:00:00 2001 From: Saul-Mirone Date: Tue, 8 Apr 2025 06:06:16 +0000 Subject: [PATCH] fix: sentry-6451187280 (#11533) Closes: BS-3075 --- .../framework/std/src/view/element/block-component.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/blocksuite/framework/std/src/view/element/block-component.ts b/blocksuite/framework/std/src/view/element/block-component.ts index 3a059cef8..37473e453 100644 --- a/blocksuite/framework/std/src/view/element/block-component.ts +++ b/blocksuite/framework/std/src/view/element/block-component.ts @@ -53,7 +53,7 @@ export class BlockComponent< options?: { global?: boolean; flavour?: boolean } ) => { this._disposables.add( - this.host.event.add(name, handler, { + this.std.event.add(name, handler, { flavour: options?.global ? undefined : options?.flavour @@ -135,12 +135,12 @@ export class BlockComponent< if (!rootId) { return null; } - const rootComponent = this.host.view.getBlock(rootId); + const rootComponent = this.std.view.getBlock(rootId); return rootComponent ?? null; } get selection() { - return this.host.selection; + return this.std.selection; } get service(): Service { @@ -162,7 +162,7 @@ export class BlockComponent< return Object.keys(this.widgets).reduce( (mapping, key) => ({ ...mapping, - [key]: this.host.view.getWidget(key, this.blockId), + [key]: this.std.view.getWidget(key, this.blockId), }), {} ); @@ -197,7 +197,7 @@ export class BlockComponent< keymap: Record, options?: { global?: boolean; flavour?: boolean } ) { - const dispose = this.host.event.bindHotkey(keymap, { + const dispose = this.std.event.bindHotkey(keymap, { flavour: options?.global ? undefined : options?.flavour