fix: 🐛 error on removeFromCart
This commit is contained in:
parent
3ede971217
commit
dc8fa4da0b
1 changed files with 3 additions and 1 deletions
|
|
@ -58,7 +58,9 @@ class BasketController extends Controller
|
|||
$rowId = $request->rowId;
|
||||
Cart::instance($instance);
|
||||
try {
|
||||
Cart::remove($rowId);
|
||||
if (Cart::content()->get($rowId)) {
|
||||
Cart::remove($rowId);
|
||||
}
|
||||
} catch (\Gloudemans\Shoppingcart\Exceptions\InvalidRowIDException $e) {
|
||||
// Attempted to remove a Row which is not in cart anymore.
|
||||
report($e);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue