Skip to content

Commit

Permalink
Use parseInt() on player levels
Browse files Browse the repository at this point in the history
  • Loading branch information
Trantion897 committed Jul 22, 2024
1 parent 9c0d16e commit 76ea8d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/rpg-system/pf2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class Pathfinder2eRpgSystem extends RpgSystem {
if (lvl == null || lvl == undefined) return 0;
const partyLvl = Math.round(
playerLevels?.length ?? 0 > 0
? playerLevels.reduce((a, b) => a + b) / playerLevels.length
? playerLevels.reduce((a, b) => parseInt(a, 10) + parseInt(b, 10)) / playerLevels.length
: 0
);

Expand Down

0 comments on commit 76ea8d1

Please sign in to comment.