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

Commit

Permalink
#134: Remove redundant action in error handling (#136)
Browse files Browse the repository at this point in the history
In `changeLineItemPrice` method, in case of the error, cart items were assinged to non-existent `initialItems`. In fact, resotring is not neede at all here, as there were not changes with the cart items before the API service call. Changes are handled by the success callback.
  • Loading branch information
yecli authored Mar 3, 2020
1 parent 335e6f1 commit 1e14aa4
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion assets/js/cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ storefrontApp.controller('cartController', ['$rootScope', '$scope', '$timeout',
getCart();
$rootScope.$broadcast('cartItemsChanged');
}, function (response) {
$scope.cart.items = initialItems;
$scope.cartIsUpdating = false;
});
};
Expand Down

0 comments on commit 1e14aa4

Please sign in to comment.