Fix click on empty space to deselect building
This commit is contained in:
parent
727b5fa6a9
commit
75caf768f0
@ -30,10 +30,14 @@ export function useBuildingData(buildingId: number, preloadedData: Building): [B
|
||||
}, [buildingId]);
|
||||
|
||||
const updateData = useCallback((building: Building) => {
|
||||
if(building == undefined) {
|
||||
setBuildingData(building);
|
||||
} else {
|
||||
if(building.verified == undefined) {
|
||||
building.verified = {} as BuildingAttributeVerificationCounts;
|
||||
}
|
||||
setBuildingData(building);
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user