Skip to content

Commit

Permalink
Fix transpile nodesOfType (#6408)
Browse files Browse the repository at this point in the history
  • Loading branch information
zurfyx authored Jul 16, 2024
1 parent 0fbab8f commit cad2861
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/lexical/src/LexicalUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ export function $nodesOfType<T extends LexicalNode>(klass: Klass<T>): Array<T> {
const nodes = getCachedTypeToNodeMap(editorState).get(klassType) as
| undefined
| Map<string, T>;
return nodes ? [...nodes.values()] : [];
return nodes ? Array.from(nodes.values()) : [];
}
const nodes = editorState._nodeMap;
const nodesOfType: Array<T> = [];
Expand Down

0 comments on commit cad2861

Please sign in to comment.