diff --git a/project/src/helpers/BotGeneratorHelper.ts b/project/src/helpers/BotGeneratorHelper.ts index a8620512..8cee1cee 100644 --- a/project/src/helpers/BotGeneratorHelper.ts +++ b/project/src/helpers/BotGeneratorHelper.ts @@ -688,13 +688,13 @@ export class BotGeneratorHelper const itemDetails = this.itemHelper.getItem(itemTpl)[1]; // if item to add is found in exclude filter, not allowed - if (excludedFilter.includes(itemDetails._parent)) + if (excludedFilter?.includes(itemDetails._parent)) { return false; } // If Filter array only contains 1 filter and its for basetype 'item', allow it - if (filter.length === 1 && filter.includes(BaseClasses.ITEM)) + if (filter?.length === 1 && filter.includes(BaseClasses.ITEM)) { return true; }