mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-04 21:15:22 +02:00
fix: recipe scaler throwing error on empty serving size (#4466)
This commit is contained in:
parent
6e045bf0c3
commit
fb0a747549
1 changed files with 2 additions and 2 deletions
|
@ -97,8 +97,8 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const numerator = ref<number>(parseFloat(props.basicYieldNum.toFixed(3)) ?? 1);
|
const numerator = ref<number>(props.basicYieldNum != null ? parseFloat(props.basicYieldNum.toFixed(3)) : 1);
|
||||||
const denominator = parseFloat(props.basicYieldNum.toFixed(32)) ?? 1;
|
const denominator = props.basicYieldNum != null ? parseFloat(props.basicYieldNum.toFixed(32)) : 1;
|
||||||
const numberParsed = !!props.basicYieldNum;
|
const numberParsed = !!props.basicYieldNum;
|
||||||
|
|
||||||
watch(() => numerator.value, () => {
|
watch(() => numerator.value, () => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue