nullguard generatePool() function inside BotEquipmentModPoolService

This commit is contained in:
Dev 2023-04-11 16:52:07 +01:00
parent 102584e24b
commit 96da3d1c6b

View File

@ -83,7 +83,7 @@ export class BotEquipmentModPoolService
// Check item added into array for slots, need to iterate over those // Check item added into array for slots, need to iterate over those
const subItemDetails = this.databaseServer.getTables().templates.items[itemToAdd]; const subItemDetails = this.databaseServer.getTables().templates.items[itemToAdd];
const hasSubItemsToAdd = subItemDetails._props.Slots?.length > 0; const hasSubItemsToAdd = subItemDetails?._props?.Slots?.length > 0;
if (hasSubItemsToAdd) if (hasSubItemsToAdd)
{ {
// Recursive call // Recursive call