Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Zamiell committed Oct 17, 2024
1 parent 5987681 commit 6c7fedf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/isaacscript-common/src/functions/array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export function arrayRemoveInPlace<T>(

for (const element of elementsToRemove) {
const index = array.indexOf(element);
if (index > -1) {
if (index !== -1) {
const removedElement = array.splice(index, 1);
removedElements.push(...removedElement);
}
Expand Down
3 changes: 1 addition & 2 deletions packages/isaacscript-common/src/functions/charge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ export function addCharge(
// add too many charges, it will grant orange "battery" charges, even if the player does not have
// The Battery.)
const chargesAwayFromMax = getChargesAwayFromMax(player, activeSlot);
const chargesToAdd =
numCharges > chargesAwayFromMax ? chargesAwayFromMax : numCharges;
const chargesToAdd = Math.min(numCharges, chargesAwayFromMax);

// The AAA Battery trinket might grant an additional charge.
const modifiedChargesToAdd = getChargesToAddWithAAAModifier(
Expand Down

0 comments on commit 6c7fedf

Please sign in to comment.