Skip to content

Commit

Permalink
Fix highest-of stat selection
Browse files Browse the repository at this point in the history
  • Loading branch information
ben authored and gitbutler-client committed Sep 27, 2023
1 parent f3a4de4 commit a87ba01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/module/rolls/preroll-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function chooseStatToRoll(
if (mode === 'Highest' || mode === 'Lowest') {
const statMap = {}
for (const x of normalizedStats) {
statMap[x] = actor.system[x]
statMap[x] = actor.system[x].value ?? actor.system[x]
}
const fn = mode === 'Highest' ? maxBy : minBy
stat = fn(Object.keys(statMap), (x) => statMap[x]) ?? stats[0]
Expand Down

0 comments on commit a87ba01

Please sign in to comment.