Fix issue with bot gen when bot config has empty equipment blacklist

This commit is contained in:
Dev 2023-05-22 17:03:24 +01:00
parent eb445b2820
commit dcc12f1fcd

View File

@ -260,7 +260,7 @@ export class BotInventoryGenerator
const modPool = this.botEquipmentModPoolService.getModsForGearSlot(itemTpl);
for (const modSlot of Object.keys(modPool ?? []))
{
const blacklistedMods = equipmentBlacklist[0].equipment[modSlot] || [];
const blacklistedMods = equipmentBlacklist[0]?.equipment[modSlot] || [];
const filteredMods = modPool[modSlot].filter(x => !blacklistedMods.includes(x));
if (filteredMods.length > 0)