Merge pull request #878 from colouring-cities/fix/855

Fix counting verifications
This commit is contained in:
Ed Chalstrey 2022-07-25 09:24:51 +01:00 committed by GitHub
commit a4ba0795bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;