fix: don't divide by 0
All checks were successful
Build / build (push) Successful in 1m34s
Build / build (pull_request) Successful in 1m0s

This commit is contained in:
Sainan 2025-05-03 00:13:06 +02:00
parent 468efed71c
commit 2489b85249

View File

@ -1449,7 +1449,11 @@ function getRandomMissionDrops(
} }
} }
rewardManifests = [job.rewards]; rewardManifests = [job.rewards];
rotations = [RewardInfo.JobStage! % (job.xpAmounts.length - 1)]; if (job.xpAmounts.length > 1) {
rotations = [RewardInfo.JobStage! % (job.xpAmounts.length - 1)];
} else {
rotations = [RewardInfo.JobStage!];
}
if ( if (
RewardInfo.Q && RewardInfo.Q &&
(RewardInfo.JobStage === job.xpAmounts.length - 1 || job.isVault) && (RewardInfo.JobStage === job.xpAmounts.length - 1 || job.isVault) &&