From 9a3464a5ec0f0e00dd7731e69faa9d2af1f68674 Mon Sep 17 00:00:00 2001 From: Andy Wang Date: Sat, 18 Jan 2020 13:19:28 +0000 Subject: [PATCH] Fix ingredient type conversion for null number --- src/core/Ingredient.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/Ingredient.mjs b/src/core/Ingredient.mjs index f74b42d6..da9c664b 100755 --- a/src/core/Ingredient.mjs +++ b/src/core/Ingredient.mjs @@ -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);