Fix ingredient type conversion for null number

This commit is contained in:
Andy Wang 2020-01-18 13:19:28 +00:00
parent 55dddd3ef9
commit 9a3464a5ec

View File

@ -113,6 +113,7 @@ class Ingredient {
return data;
}
case "number":
if (data === null) return 0;
number = parseFloat(data);
if (isNaN(number)) {
const sample = Utils.truncate(data.toString(), 10);