From 8e8de312b4d22e64229c1c72c1711e656ed0e745 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Sat, 19 Apr 2025 18:18:51 +0200 Subject: [PATCH] fix: don't give rewards for aborted railjack missions --- src/services/missionInventoryUpdateService.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/services/missionInventoryUpdateService.ts b/src/services/missionInventoryUpdateService.ts index 7b27faa9..4dcb0fe4 100644 --- a/src/services/missionInventoryUpdateService.ts +++ b/src/services/missionInventoryUpdateService.ts @@ -71,7 +71,12 @@ const getRotations = (rewardInfo: IRewardInfo, tierOverride?: number): number[] return [rewardInfo.rewardTier]; } - const rotationCount = rewardInfo.rewardQualifications?.length || 0; + // Aborting a railjack mission should not give any rewards (https://onlyg.it/OpenWF/SpaceNinjaServer/issues/1741) + if (rewardInfo.rewardQualifications === undefined) { + return []; + } + + const rotationCount = rewardInfo.rewardQualifications.length || 0; if (rotationCount === 0) return [0]; const rotationPattern =