[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--;
}
if (typeof record == 'object') {
if (record.quantity == 1) {
let i = state.added.findIndex(p => p.id === id);
state.added.splice(i,1);
//state.added.remove(record)
} else {
record.quantity--;
}
}