length1Ref current가 없을 경우는 실행하지 않는다
This commit is contained in:
parent
6b3d0ea6ff
commit
eb928fc4f2
@ -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
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user