fix zod validation on units due to malformed array

This commit is contained in:
evanpelle
2025-05-27 18:30:08 -07:00
parent 2b1f2dca6e
commit 1548d0a76f
+1 -1
View File
@@ -118,7 +118,7 @@ export class StatsImpl implements Stats {
if (p === undefined) return;
if (p.units === undefined) p.units = { [type]: [0] };
if (p.units[type] === undefined) p.units[type] = [0];
while (p.units[type].length < index) p.units[type].push(0);
while (p.units[type].length <= index) p.units[type].push(0);
p.units[type][index] += value;
}