fix(nodes): guard previewRef in fence tool onGridClick (Sentry MONOREPO-EDITOR-BE/CR) (#434)
Co-authored-by: openclaw-agent <agent@pascal.app>
This commit is contained in:
@@ -552,6 +552,7 @@ export const FenceTool: React.FC = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const onGridClick = (event: GridEvent) => {
|
const onGridClick = (event: GridEvent) => {
|
||||||
|
if (!previewRef.current) return
|
||||||
if (buildingState.current === 1 && event.nativeEvent.detail >= 2) {
|
if (buildingState.current === 1 && event.nativeEvent.detail >= 2) {
|
||||||
stopDrafting()
|
stopDrafting()
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user