diff --git a/frontend/components/Domain/Recipe/RecipeNutrition.vue b/frontend/components/Domain/Recipe/RecipeNutrition.vue index 116e283d0551..7c45f1138262 100644 --- a/frontend/components/Domain/Recipe/RecipeNutrition.vue +++ b/frontend/components/Domain/Recipe/RecipeNutrition.vue @@ -81,9 +81,12 @@ export default defineComponent({ }, }; const valueNotNull = computed(() => { - Object.values(props.value).forEach((valueProperty) => { - if (valueProperty && valueProperty !== "") return true; - }); + let key: keyof Nutrition; + for (key in props.value) { + if (props.value[key] !== null) { + return true; + } + } return false; }); @@ -97,8 +100,8 @@ export default defineComponent({ labels, valueNotNull, showViewer, - updateValue - } + updateValue, + }; }, });