Fixed invalid check inside getBonusValueFromProfile()

(cherry picked from commit 77c98a4cd4)
This commit is contained in:
Dev 2024-08-09 22:05:07 +01:00
parent 2e9a6016f1
commit 0a229d78be

View File

@ -509,8 +509,7 @@ export class ProfileHelper {
*/ */
public getBonusValueFromProfile(pmcProfile: IPmcData, desiredBonus: BonusType): number { public getBonusValueFromProfile(pmcProfile: IPmcData, desiredBonus: BonusType): number {
const bonuses = pmcProfile.Bonuses.filter((bonus) => bonus.type === desiredBonus); const bonuses = pmcProfile.Bonuses.filter((bonus) => bonus.type === desiredBonus);
if (!bonuses) if (bonuses.length === 0) {
{
return 0; return 0;
} }