Skip to content

Commit

Permalink
fix: recipe scaler throwing error on empty serving size (#4466)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuchenpirat authored Oct 29, 2024
1 parent 6e045bf commit fb0a747
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/components/Domain/Recipe/RecipeScaleEditButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ export default defineComponent({
},
});
const numerator = ref<number>(parseFloat(props.basicYieldNum.toFixed(3)) ?? 1);
const denominator = parseFloat(props.basicYieldNum.toFixed(32)) ?? 1;
const numerator = ref<number>(props.basicYieldNum != null ? parseFloat(props.basicYieldNum.toFixed(3)) : 1);
const denominator = props.basicYieldNum != null ? parseFloat(props.basicYieldNum.toFixed(32)) : 1;
const numberParsed = !!props.basicYieldNum;
watch(() => numerator.value, () => {
Expand Down

0 comments on commit fb0a747

Please sign in to comment.