Answer the question
In order to leave comments, you need to log in
Why is the object not being removed from the array?
Hi all!
there is a mutation
[types.REMOVE_FROM_CART] (state, { id }) {
state.lastCheckout = null
const record = state.added.find(p => p.id === id)
if (typeof record == 'object')
if (record.quantity == 1) {
state.added.remove(record)
} else {
record.quantity--;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question