Skip to content

Commit

Permalink
[Core] fix cart quantity modifer -> always recalculate the default un…
Browse files Browse the repository at this point in the history
…it quantity, cause when you only set it to 1, its already the same quantity and wouldn't trigger a change
  • Loading branch information
dpfaffenbauer committed Mar 22, 2019
1 parent 8bc3a3b commit 366af72
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ public function modify(StorageListItemInterface $item, int $targetQuantity)
*/
Assert::isInstanceOf($item, CartItemInterface::class);

$currentQuantity = $item->getQuantity();
if (0 >= $targetQuantity || $currentQuantity === $targetQuantity) {
return;
}

$item->setQuantity($targetQuantity);

if ($item->hasUnitDefinition()) {
Expand Down

0 comments on commit 366af72

Please sign in to comment.