Fixed invalid check inside getBonusValueFromProfile()
(cherry picked from commit 77c98a4cd4
)
This commit is contained in:
parent
2e9a6016f1
commit
0a229d78be
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user