Added additional nullguard protection to getSealedContainerWeaponModRewards()

This commit is contained in:
Dev 2024-09-10 18:16:21 +01:00
parent e650271d3a
commit 4f65442fe7

View File

@ -516,7 +516,7 @@ export class LootGenerator {
// Get items that fulfil reward type criteria from items that fit on gun // Get items that fulfil reward type criteria from items that fit on gun
const relatedItems = linkedItemsToWeapon?.filter( const relatedItems = linkedItemsToWeapon?.filter(
(item) => item._parent === rewardTypeId && !this.itemFilterService.isItemBlacklisted(item._id), (item) => item?._parent === rewardTypeId && !this.itemFilterService.isItemBlacklisted(item._id),
); );
if (!relatedItems || relatedItems.length === 0) { if (!relatedItems || relatedItems.length === 0) {
this.logger.debug( this.logger.debug(