Fixed itemAllowedInContainer()
failing when the filter or excluded filter objects are null
This commit is contained in:
parent
0d6239ea42
commit
d31eedf92b
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user