Fix ingredient type conversion for null number
This commit is contained in:
parent
55dddd3ef9
commit
9a3464a5ec
@ -113,6 +113,7 @@ class Ingredient {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
case "number":
|
case "number":
|
||||||
|
if (data === null) return 0;
|
||||||
number = parseFloat(data);
|
number = parseFloat(data);
|
||||||
if (isNaN(number)) {
|
if (isNaN(number)) {
|
||||||
const sample = Utils.truncate(data.toString(), 10);
|
const sample = Utils.truncate(data.toString(), 10);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user