Preserve null data when type is number in prepare

This commit is contained in:
Andy Wang 2020-01-18 14:56:17 +00:00
parent 293a95e938
commit 1197859865
1 changed files with 1 additions and 1 deletions

View File

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