Fix counting verifications

This commit is contained in:
Tom Russell 2022-07-22 15:44:40 +01:00
parent d6ca1c4dc4
commit c625754d1b

View File

@ -59,7 +59,8 @@ export async function getBuildingVerifications(building: BaseBuilding) {
for (const item of verifications) {
if (JSON.stringify(building[item.attribute]) == JSON.stringify(item.verified_value)) {
verified[item.attribute] = verified[item.attribute] ?? 0 + 1;
const count = verified[item.attribute] || 0;
verified[item.attribute] = count + 1;
}
}
return verified;