diff options
author | Tommy Messbauer <tommy@vast.com> | 2013-02-11 23:00:47 -0600 |
---|---|---|
committer | Tommy Messbauer <tommy@vast.com> | 2013-02-11 23:00:47 -0600 |
commit | 1ca7462497b5207e7e58f3a37274d486068ed06a (patch) | |
tree | d6b2e65ea2c4da666660d70d5857f008bf5a41fe /lib/handlebars/utils.js | |
parent | 514c9391e0fbee8a0c8c184bcef77d6be38722aa (diff) | |
parent | 7c633b604df137f062d96c30f015847bad20e34e (diff) | |
download | handlebars.js-1ca7462497b5207e7e58f3a37274d486068ed06a.zip handlebars.js-1ca7462497b5207e7e58f3a37274d486068ed06a.tar.gz handlebars.js-1ca7462497b5207e7e58f3a37274d486068ed06a.tar.bz2 |
merge
Diffstat (limited to 'lib/handlebars/utils.js')
-rw-r--r-- | lib/handlebars/utils.js | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/handlebars/utils.js b/lib/handlebars/utils.js index cd02e95..2a7861a 100644 --- a/lib/handlebars/utils.js +++ b/lib/handlebars/utils.js @@ -53,11 +53,7 @@ Handlebars.SafeString.prototype.toString = function() { }, isEmpty: function(value) { - if (typeof value === "undefined") { - return true; - } else if (value === null) { - return true; - } else if (value === false) { + if (!value && value !== 0) { return true; } else if(Object.prototype.toString.call(value) === "[object Array]" && value.length === 0) { return true; |