XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

SpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 1 Star 0
返回提交历史

XFEstudio/SpaceNinjaServer

fix: don't assume rewardInfo.node is in ExportRegions (#1879)

Fixes #1878 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1879 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

cf5ed044
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

1 个文件 +3 -2
Modified src/services/missionInventoryUpdateService.ts +3 -2
@@ -70,10 +70,11 @@ const getRotations = (rewardInfo: IRewardInfo, tierOverride?: number): number[]
70 70 return rotations;
71 71 }
72 72
73 const missionIndex = ExportRegions[rewardInfo.node].missionIndex;
73 // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
74 const missionIndex: number | undefined = ExportRegions[rewardInfo.node]?.missionIndex;
74 75
75 76 // For Rescue missions
76 if (rewardInfo.node in ExportRegions && missionIndex == 3 && rewardInfo.rewardTier) {
77 if (missionIndex == 3 && rewardInfo.rewardTier) {
77 78 return [rewardInfo.rewardTier];
78 79 }
79 80