From 4f6e1f6871cf8542577a0743590f741caf73ee60 Mon Sep 17 00:00:00 2001 From: icrosil Date: Mon, 11 Dec 2023 12:31:53 +0000 Subject: [PATCH] tsc fix --- packages/lexical-table/src/LexicalGridSelection.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/lexical-table/src/LexicalGridSelection.ts b/packages/lexical-table/src/LexicalGridSelection.ts index 2add100bfe1..0719f3c3cc5 100644 --- a/packages/lexical-table/src/LexicalGridSelection.ts +++ b/packages/lexical-table/src/LexicalGridSelection.ts @@ -91,6 +91,10 @@ export class GridSelection extends INTERNAL_PointSelection { insertNodes(nodes: Array) { const focusNode = this.focus.getNode(); + invariant( + $isElementNode(focusNode), + 'Expected GridSelection focus to be an ElementNode', + ); const selection = $normalizeSelection__EXPERIMENTAL( focusNode.select(0, focusNode.getChildrenSize()), );