From 4f65442fe7ceeef83f2201be9628e0d97c29824b Mon Sep 17 00:00:00 2001 From: Dev Date: Tue, 10 Sep 2024 18:16:21 +0100 Subject: [PATCH] Added additional nullguard protection to `getSealedContainerWeaponModRewards()` --- project/src/generators/LootGenerator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/src/generators/LootGenerator.ts b/project/src/generators/LootGenerator.ts index b514618a..ed7ba4da 100644 --- a/project/src/generators/LootGenerator.ts +++ b/project/src/generators/LootGenerator.ts @@ -516,7 +516,7 @@ export class LootGenerator { // Get items that fulfil reward type criteria from items that fit on gun 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) { this.logger.debug(