fixed copied ingredients being linked together

This commit is contained in:
vabene1111 2023-07-22 12:59:31 +02:00
parent d5ba2e6716
commit c18386b9b5

View File

@ -1281,6 +1281,7 @@ export default {
},
duplicateIngredient: function (step, ingredient, new_index) {
delete ingredient.id
ingredient = JSON.parse(JSON.stringify(ingredient))
step.ingredients.splice(new_index < 0 ? 0 : new_index, 0, ingredient)
}
},