Handle edge case when an item is missing a min/max stack size value

This commit is contained in:
Dev 2023-12-07 20:07:46 +00:00
parent 3f46cffcfe
commit 7c2d93e87b

View File

@ -209,7 +209,7 @@ export class LootGenerator
max = options.itemStackLimits[item._id].max; max = options.itemStackLimits[item._id].max;
} }
return this.randomUtil.getInt(min, max); return this.randomUtil.getInt(min ?? 1, max ?? 1);
} }
/** /**