From ea52da272ad777f6a19e4162af08464281621384 Mon Sep 17 00:00:00 2001 From: Gerard Rovira Date: Tue, 16 Jul 2024 15:49:46 +0100 Subject: [PATCH] Fix transpile nodesOfType (#6408) --- 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 8cc3099462db..52ac015239e6 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 = [];