Skip to content

Commit

Permalink
Restrict the plate max charge, see #713
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Nov 13, 2021
1 parent 8cf1965 commit 483c50c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/capacitor/PlateChargeNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class PlateChargeNode extends CanvasNode {
if ( absCharge > 0 && numberOfCharges < NUMBER_OF_PLATE_CHARGES.min ) {
numberOfCharges = NUMBER_OF_PLATE_CHARGES.min;
}
return numberOfCharges;
return Math.min( NUMBER_OF_PLATE_CHARGES.max, numberOfCharges );
}
}

Expand Down

0 comments on commit 483c50c

Please sign in to comment.