From e48bb2c1c4c2b9468123f3cc79329a0ee6453e56 Mon Sep 17 00:00:00 2001 From: Gerard Rovira Date: Tue, 16 Jul 2024 10:43:33 -0400 Subject: [PATCH] Fix transpile nodesoftype --- packages/lexical/src/LexicalUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/lexical/src/LexicalUtils.ts b/packages/lexical/src/LexicalUtils.ts index 8cc3099462d..52ac015239e 100644 --- a/packages/lexical/src/LexicalUtils.ts +++ b/packages/lexical/src/LexicalUtils.ts @@ -1124,7 +1124,7 @@ export function $nodesOfType(klass: Klass): Array { const nodes = getCachedTypeToNodeMap(editorState).get(klassType) as | undefined | Map; - return nodes ? [...nodes.values()] : []; + return nodes ? Array.from(nodes.values()) : []; } const nodes = editorState._nodeMap; const nodesOfType: Array = [];