fixed ingredient paste and plan share serialize

This commit is contained in:
vabene1111
2022-06-14 21:48:17 +02:00
parent 355f181574
commit 356dec636f
2 changed files with 2 additions and 2 deletions

View File

@ -1136,7 +1136,7 @@ export default {
if (ing.trim() !== "") {
this.genericPostAPI("api_ingredient_from_string", {text: ing}).then((result) => {
let unit = null
if (result.data.unit !== "") {
if (result.data.unit !== "" && result.data.unit !== null) {
unit = {name: result.data.unit}
}
this.recipe.steps[step].ingredients.splice(order, 0, {