Skip to content

Commit

Permalink
fix(web): Prevent null node filtering in skill node edge creation
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcfps committed Feb 4, 2025
1 parent 13549c6 commit 43dbc21
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export const SkillNode = memo(

const nodes = getNodes() as CanvasNode<any>[];
const entityNodeMap = new Map(nodes.map((node) => [node.data?.entityId, node]));
const contextNodes = items.map((item) => entityNodeMap.get(item.entityId));
const contextNodes = items.map((item) => entityNodeMap.get(item.entityId)).filter(Boolean);

const edges = getEdges();
const existingEdges = edges?.filter((edge) => edge.target === id) ?? [];
Expand Down

0 comments on commit 43dbc21

Please sign in to comment.