summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/utils.js
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-12-21 09:46:50 -0800
committerwycats <wycats@gmail.com>2010-12-21 09:46:50 -0800
commit8fccd2128360483ae02f0d5ef95ad21578958ff9 (patch)
tree490f3ee420011f94e3e021e4308c14575c9367b0 /lib/handlebars/utils.js
parente0246d7dfc93fc35d3bd8fe6bdd71bb038df0033 (diff)
downloadhandlebars.js-8fccd2128360483ae02f0d5ef95ad21578958ff9.zip
handlebars.js-8fccd2128360483ae02f0d5ef95ad21578958ff9.tar.gz
handlebars.js-8fccd2128360483ae02f0d5ef95ad21578958ff9.tar.bz2
escapeExpressions should return "" for falsy values
Diffstat (limited to 'lib/handlebars/utils.js')
-rw-r--r--lib/handlebars/utils.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/handlebars/utils.js b/lib/handlebars/utils.js
index bc816d5..d579c0b 100644
--- a/lib/handlebars/utils.js
+++ b/lib/handlebars/utils.js
@@ -31,8 +31,8 @@ Handlebars.SafeString.prototype.toString = function() {
// don't escape SafeStrings, since they're already safe
if (string instanceof Handlebars.SafeString) {
return string.toString();
- } else if (string === null) {
- string = "";
+ } else if (string == null || string === false) {
+ return "";
}
if(!possible.test(string)) { return string; }