Skip to content

Commit

Permalink
fix: 최초 렌더링시 중복된 web worker 생성 막기 (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
yeynii authored Dec 15, 2022
1 parent ab24c17 commit f977fd2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const ReferenceGraph = ({ data, addChildrensNodes, hoveredNode, changeHoveredNod
useGraphEmphasize(nodeRef.current, linkRef.current, nodes, links, hoveredNode, data.key);

useEffect(() => {
if (!svgRef.current) return;
if (!svgRef.current || (nodes.length === 0 && links.length === 0)) return;

if (workerRef.current !== null) {
workerRef.current.terminate();
Expand Down

0 comments on commit f977fd2

Please sign in to comment.