From 0a229d78be906cc8c1e0697170bebffceba97cc1 Mon Sep 17 00:00:00 2001 From: Dev Date: Fri, 9 Aug 2024 22:05:07 +0100 Subject: [PATCH] Fixed invalid check inside `getBonusValueFromProfile()` (cherry picked from commit 77c98a4cd4068a89545b2099b60a5fc08845beb0) --- project/src/helpers/ProfileHelper.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/project/src/helpers/ProfileHelper.ts b/project/src/helpers/ProfileHelper.ts index 53014cfa..13bb1fb3 100644 --- a/project/src/helpers/ProfileHelper.ts +++ b/project/src/helpers/ProfileHelper.ts @@ -509,8 +509,7 @@ export class ProfileHelper { */ public getBonusValueFromProfile(pmcProfile: IPmcData, desiredBonus: BonusType): number { const bonuses = pmcProfile.Bonuses.filter((bonus) => bonus.type === desiredBonus); - if (!bonuses) - { + if (bonuses.length === 0) { return 0; }