Skip to content

Commit

Permalink
Use this instead of null in bind method argument
Browse files Browse the repository at this point in the history
  • Loading branch information
binos30 committed Aug 11, 2024
1 parent bfd2d9c commit 0255008
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/javascript/controllers/site/cart_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export default class extends Controller {
minValue = minValue ? parseInt(minValue) : null;
maxValue = maxValue ? parseInt(maxValue) : null;

incrementEl.removeEventListener("click", this.incrementClickHandler.bind(null, targetEl, maxValue), false);
decrementEl.removeEventListener("click", this.decrementClickHandler.bind(null, targetEl, minValue), false);
incrementEl.removeEventListener("click", this.incrementClickHandler.bind(this, targetEl, maxValue), false);
decrementEl.removeEventListener("click", this.decrementClickHandler.bind(this, targetEl, minValue), false);
});
}

Expand Down

0 comments on commit 0255008

Please sign in to comment.