Skip to content
This repository has been archived by the owner on May 12, 2022. It is now read-only.

Commit

Permalink
Fix maxCR == 0 not actually filtering. Closes Asmor#189. (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Villawhatever authored Aug 23, 2021
1 parent 412de58 commit 2f97729
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/monsterfactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,11 @@
}

if ( !args.skipCrCheck ) {
if ( filters.minCr && monster.cr.numeric < filters.minCr ) {
if ( (filters.minCr !== null) && monster.cr.numeric < filters.minCr ) {
return true;
}

if ( filters.maxCr && monster.cr.numeric > filters.maxCr ) {
if ( (filters.maxCr !== null) && monster.cr.numeric > filters.maxCr ) {
return true;
}
}
Expand Down

0 comments on commit 2f97729

Please sign in to comment.