Skip to content

Commit

Permalink
Merge pull request #447 from refly-ai/fix/copy-text-inf-loop
Browse files Browse the repository at this point in the history
fix(web): infinite loop error when importing text
  • Loading branch information
mrcfps authored Feb 4, 2025
2 parents 2c6ea7c + 43dbc21 commit 9afd53e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const ImportFromText = () => {
/* reset and copiedTextPayload after modal hide */
setCopiedTextPayload({ title: '', content: '', url: '' });
};
}, [copiedTextPayload, setCopiedTextPayload]);
}, []);

return (
<div className="h-full flex flex-col min-w-[500px] box-border intergation-import-from-weblink">
Expand Down

0 comments on commit 9afd53e

Please sign in to comment.