Fixed invalid check inside getBonusValueFromProfile()

This commit is contained in:
Dev 2024-08-09 22:05:07 +01:00
parent 8d0dfc1cf8
commit 77c98a4cd4

View File

@ -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;
}