From f977fd2f5cd7250604700f67c3aaa2124ed05360 Mon Sep 17 00:00:00 2001 From: yeynii Date: Thu, 15 Dec 2022 16:33:50 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=B5=9C=EC=B4=88=20=EB=A0=8C=EB=8D=94?= =?UTF-8?q?=EB=A7=81=EC=8B=9C=20=EC=A4=91=EB=B3=B5=EB=90=9C=20web=20worker?= =?UTF-8?q?=20=EC=83=9D=EC=84=B1=20=EB=A7=89=EA=B8=B0=20(#142)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/PaperDetail/components/ReferenceGraph.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/PaperDetail/components/ReferenceGraph.tsx b/frontend/src/pages/PaperDetail/components/ReferenceGraph.tsx index c16804f..920b73c 100644 --- a/frontend/src/pages/PaperDetail/components/ReferenceGraph.tsx +++ b/frontend/src/pages/PaperDetail/components/ReferenceGraph.tsx @@ -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();