From a5abeb41adf51d4793cd9699102aded74b2e7e24 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Wed, 14 Oct 2026 14:41:37 +0400 Subject: [PATCH] refac --- src/lib/components/common/diffEditorAlignment.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/common/diffEditorAlignment.ts b/src/lib/components/common/diffEditorAlignment.ts index 3fb30c1a6b..8fec987d0b 100644 --- a/src/lib/components/common/diffEditorAlignment.ts +++ b/src/lib/components/common/diffEditorAlignment.ts @@ -65,7 +65,7 @@ export function alignChangedLines(a: EditorView, b: EditorView, chunks: readonly const block = view.lineBlockAt(pos); const text = Array.isArray(block.type) ? block.type.find((part) => part.type === BlockType.Text && part.from === pos) - : block; + : block.type === BlockType.Text ? block : null; return text?.from === pos ? text.top : null; }; const align = (posA: number, posB: number) => {