fix: add null guards for cursorRef in fence and wall tool click handlers

This commit is contained in:
open-pascal
2026-05-20 00:57:15 +00:00
parent 3adae8acea
commit 251af2ce1d
2 changed files with 2 additions and 23 deletions
+1 -2
View File
@@ -481,8 +481,7 @@ export const WallTool: React.FC = () => {
const nextStart = createdWall.end
startingPoint.current.set(nextStart[0], event.localPosition[1], nextStart[1])
endingPoint.current.copy(startingPoint.current)
cursorRef.current.position.copy(startingPoint.current)
wallPreviewRef.current.visible = false
cursorRef.current?.position.copy(startingPoint.current)
buildingState.current = 1
setDraftMeasurement(null)
}