From 277d2b1e52208b21f43986dffc230c87fbef2c35 Mon Sep 17 00:00:00 2001 From: Saul-Mirone Date: Wed, 18 Dec 2024 12:40:13 +0000 Subject: [PATCH] fix: drag doc from affine to edgeless (#9011) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: [BS-2167](https://linear.app/affine-design/issue/BS-2167/从侧边栏上往白板上拖拽-doc,无法插入到白板上(除了-note)) --- .../widgets/drag-handle/watchers/drag-event-watcher.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/blocks/src/root-block/widgets/drag-handle/watchers/drag-event-watcher.ts b/packages/blocks/src/root-block/widgets/drag-handle/watchers/drag-event-watcher.ts index 8c7d78636834..38e9ff2f6c4b 100644 --- a/packages/blocks/src/root-block/widgets/drag-handle/watchers/drag-event-watcher.ts +++ b/packages/blocks/src/root-block/widgets/drag-handle/watchers/drag-event-watcher.ts @@ -339,7 +339,7 @@ export class DragEventWatcher { ['affine:attachment', 'affine:bookmark'].includes(first.flavour) || first.flavour.startsWith('affine:embed-') ) { - const style = first.props.style as EmbedCardStyle; + const style = (first.props.style ?? 'horizontal') as EmbedCardStyle; const width = EMBED_CARD_WIDTH[style]; const height = EMBED_CARD_HEIGHT[style];