diff options
Diffstat (limited to 'client/src/store/index.js')
-rw-r--r-- | client/src/store/index.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/client/src/store/index.js b/client/src/store/index.js index a2d3f9f..7c3d396 100644 --- a/client/src/store/index.js +++ b/client/src/store/index.js @@ -65,6 +65,9 @@ export default createStore({ if (foundProduct.quantity == 0) state.cart = state.cart.filter(x => x.id != foundProduct.id); } + }, + clearCart(state) { + state.cart.length = 0; } }, actions: { |