fix: entry nutrition checker (#1448)

This commit is contained in:
Hayden 2022-06-25 12:19:04 -08:00 committed by GitHub
parent cb15db2d27
commit b921e95163
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,9 +81,12 @@ export default defineComponent({
}, },
}; };
const valueNotNull = computed(() => { const valueNotNull = computed(() => {
Object.values(props.value).forEach((valueProperty) => { let key: keyof Nutrition;
if (valueProperty && valueProperty !== "") return true; for (key in props.value) {
}); if (props.value[key] !== null) {
return true;
}
}
return false; return false;
}); });
@ -97,8 +100,8 @@ export default defineComponent({
labels, labels,
valueNotNull, valueNotNull,
showViewer, showViewer,
updateValue updateValue,
} };
}, },
}); });
</script> </script>