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;
|
$rowId = $request->rowId;
|
||||||
Cart::instance($instance);
|
Cart::instance($instance);
|
||||||
try {
|
try {
|
||||||
Cart::remove($rowId);
|
if (Cart::content()->get($rowId)) {
|
||||||
|
Cart::remove($rowId);
|
||||||
|
}
|
||||||
} catch (\Gloudemans\Shoppingcart\Exceptions\InvalidRowIDException $e) {
|
} catch (\Gloudemans\Shoppingcart\Exceptions\InvalidRowIDException $e) {
|
||||||
// Attempted to remove a Row which is not in cart anymore.
|
// Attempted to remove a Row which is not in cart anymore.
|
||||||
report($e);
|
report($e);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue