Skip to content

Commit

Permalink
Fix: Cart is emptied when enter is pressed after changing product qua…
Browse files Browse the repository at this point in the history
…ntity
  • Loading branch information
lfluvisotto committed Feb 28, 2019
1 parent 13b0fe9 commit 5a73640
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ define([
_create: function () {
var items, i;

$(this.options.emptyCartButton).on('click', $.proxy(function () {
$(this.options.emptyCartButton).on('click', $.proxy(function (event) {
if (event.detail == 0) {
return;
}

$(this.options.emptyCartButton).attr('name', 'update_cart_action_temp');
$(this.options.updateCartActionContainer)
.attr('name', 'update_cart_action').attr('value', 'empty_cart');
Expand Down

0 comments on commit 5a73640

Please sign in to comment.