From 92c33c9c11c88b4eeed96a1db77e0664e0fe08dd Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Wed, 7 May 2025 10:46:57 +0900 Subject: [PATCH] =?UTF-8?q?polygonLines=EA=B0=80=20=EC=97=86=EB=8A=94=20?= =?UTF-8?q?=EA=B2=BD=EC=9A=B0=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/usePolygon.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hooks/usePolygon.js b/src/hooks/usePolygon.js index a2c8c9aa..7b14b906 100644 --- a/src/hooks/usePolygon.js +++ b/src/hooks/usePolygon.js @@ -949,7 +949,8 @@ export const usePolygon = () => { //polygonLines에서 divideLines를 제거하고 newLines를 추가한다. newLines = newLines.filter((line) => !(Math.abs(line.startPoint.x - line.endPoint.x) < 1 && Math.abs(line.startPoint.y - line.endPoint.y) < 1)) - polygonLines = polygonLines.filter((line) => line.intersections?.length === 0) + + polygonLines = polygonLines.filter((line) => !line.intersections || line.intersections.length === 0) polygonLines = [...polygonLines, ...newLines]