From eb928fc4f2afb0c5a561b03789a56af00efd94b1 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Wed, 5 Mar 2025 14:16:19 +0900 Subject: [PATCH] =?UTF-8?q?length1Ref=20current=EA=B0=80=20=EC=97=86?= =?UTF-8?q?=EC=9D=84=20=EA=B2=BD=EC=9A=B0=EB=8A=94=20=EC=8B=A4=ED=96=89?= =?UTF-8?q?=ED=95=98=EC=A7=80=20=EC=95=8A=EB=8A=94=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/surface/usePlacementShapeDrawing.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hooks/surface/usePlacementShapeDrawing.js b/src/hooks/surface/usePlacementShapeDrawing.js index 50f61172..983583ba 100644 --- a/src/hooks/surface/usePlacementShapeDrawing.js +++ b/src/hooks/surface/usePlacementShapeDrawing.js @@ -688,8 +688,9 @@ export function usePlacementShapeDrawing(id) { } // 포커스가 length1에 있지 않으면 length1에 포커스를 줌 const activeElem = document.activeElement + if (activeElem !== length1Ref.current) { - length1Ref.current.focus() + length1Ref.current?.focus() } const key = e.key @@ -698,7 +699,7 @@ export function usePlacementShapeDrawing(id) { return } - const lengthNum = Number(length1Ref.current.value) / 10 + const lengthNum = Number(length1Ref.current?.value) / 10 if (lengthNum === 0) { return }