diff --git a/numeral.js b/numeral.js index 22726c9e..72a88f8b 100644 --- a/numeral.js +++ b/numeral.js @@ -59,7 +59,7 @@ if (numeral.isNumeral(input)) { value = input.value(); - } else if (input === 0 || typeof input === 'undefined') { + } else if (input === 0 || input == null || typeof input === 'undefined' || input.equals('')) { value = 0; } else if (input === null || _.isNaN(input)) { value = null; diff --git a/src/numeral.js b/src/numeral.js index 3a9d2521..ef96c448 100644 --- a/src/numeral.js +++ b/src/numeral.js @@ -59,7 +59,7 @@ if (numeral.isNumeral(input)) { value = input.value(); - } else if (input === 0 || typeof input === 'undefined') { + } else if (input === 0 || input == null || typeof input === 'undefined' || input.equals('')) { value = 0; } else if (input === null || _.isNaN(input)) { value = null;