Added nullguard when purchasing trader assort with 0 items
This commit is contained in:
parent
da46a9cc93
commit
6c1935f93f
@ -186,6 +186,10 @@ export class TradeHelper
|
|||||||
|
|
||||||
// Get item + children for purchase
|
// Get item + children for purchase
|
||||||
const relevantItems = this.itemHelper.findAndReturnChildrenAsItems(traderItems, buyRequestData.item_id);
|
const relevantItems = this.itemHelper.findAndReturnChildrenAsItems(traderItems, buyRequestData.item_id);
|
||||||
|
if (relevantItems.length === 0)
|
||||||
|
{
|
||||||
|
this.logger.error(`Purchased trader: ${buyRequestData.tid} offer: ${buyRequestData.item_id} has no items`);
|
||||||
|
}
|
||||||
offerItems.push(...relevantItems);
|
offerItems.push(...relevantItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user