fixed copied ingredients being linked together
This commit is contained in:
parent
d5ba2e6716
commit
c18386b9b5
@ -1281,6 +1281,7 @@ export default {
|
|||||||
},
|
},
|
||||||
duplicateIngredient: function (step, ingredient, new_index) {
|
duplicateIngredient: function (step, ingredient, new_index) {
|
||||||
delete ingredient.id
|
delete ingredient.id
|
||||||
|
ingredient = JSON.parse(JSON.stringify(ingredient))
|
||||||
step.ingredients.splice(new_index < 0 ? 0 : new_index, 0, ingredient)
|
step.ingredients.splice(new_index < 0 ? 0 : new_index, 0, ingredient)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user