From 7e2aee53dbaf73c70939e2aa0590bbd049069468 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Mon, 27 Nov 2023 22:33:48 +0100 Subject: [PATCH] fixed import ingredient edit modal cleanup --- vue/src/apps/ImportView/ImportViewStepEditor.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vue/src/apps/ImportView/ImportViewStepEditor.vue b/vue/src/apps/ImportView/ImportViewStepEditor.vue index f1cb9da4b..0d0ff94e6 100644 --- a/vue/src/apps/ImportView/ImportViewStepEditor.vue +++ b/vue/src/apps/ImportView/ImportViewStepEditor.vue @@ -62,7 +62,7 @@ - +
@@ -88,8 +88,8 @@
- {{ $t('Ok') }} - {{ $t('Delete') }} + {{ $t('Ok') }} + {{ $t('Delete') }}
@@ -252,10 +252,10 @@ export default { */ destroyIngredientEditModal: function () { this.$bvModal.hide('ingredient_edit_modal') - if (this.current_edit_ingredient.unit.name === ''){ + if (this.current_edit_ingredient.unit !== null && this.current_edit_ingredient.unit.name === '') { this.current_edit_ingredient.unit = null } - if (this.current_edit_ingredient.food.name === ''){ + if (this.current_edit_ingredient.food !== null && this.current_edit_ingredient.food.name === '') { this.current_edit_ingredient.food = null } this.current_edit_ingredient = null