diff --git a/src/uix/soma/components/words/engine/operations/selection-walkers.ts b/src/uix/soma/components/words/engine/operations/selection-walkers.ts index d617897a3..30cf47061 100644 --- a/src/uix/soma/components/words/engine/operations/selection-walkers.ts +++ b/src/uix/soma/components/words/engine/operations/selection-walkers.ts @@ -67,10 +67,15 @@ export function getTextEntries(doc: WordsDocument): readonly WordsTextEntry[] { } function collectBlockText( - block: WordsDocument['children'][number], + block: WordsDocument['children'][number] | undefined, path: WordsPath, out: WordsTextEntry[] ): void { + // Robustness: a cell / column / callout child slot can momentarily be + // undefined during an editing transition. Skip it rather than throwing + // from the mark-walk — an uncaught error here aborts the command and + // leaves the editor unable to edit at all. + if (!block) return; switch (block.type) { case 'paragraph': case 'heading':