diff --git a/project/src/helpers/ItemHelper.ts b/project/src/helpers/ItemHelper.ts index efa8fc5d..4929afde 100644 --- a/project/src/helpers/ItemHelper.ts +++ b/project/src/helpers/ItemHelper.ts @@ -1105,7 +1105,13 @@ export class ItemHelper protected drawAmmoTpl(caliber: string, staticAmmoDist: Record): string { const ammoArray = new ProbabilityObjectArray(this.mathUtil, this.jsonUtil); - for (const icd of staticAmmoDist[caliber]) + const ammos = staticAmmoDist[caliber]; + if (!ammos) + { + this.logger.error(`missing caliber data for: ${caliber}`); + } + + for (const icd of ammos) { ammoArray.push(new ProbabilityObject(icd.tpl, icd.relativeProbability)); }