diff --git a/code/20 Advanced Redux/02-refresher-practice-finished/src/store/cart-slice.js b/code/20 Advanced Redux/02-refresher-practice-finished/src/store/cart-slice.js index dce632d86..1d26d83aa 100644 --- a/code/20 Advanced Redux/02-refresher-practice-finished/src/store/cart-slice.js +++ b/code/20 Advanced Redux/02-refresher-practice-finished/src/store/cart-slice.js @@ -32,6 +32,7 @@ const cartSlice = createSlice({ state.items = state.items.filter(item => item.id !== id); } else { existingItem.quantity--; + existingItem.totalPrice = existingItem.totalPrice - newItem.price; } }, },