mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-22 11:31:21 +00:00
fix zod validation on units due to malformed array
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user