escapeExpressions should return "" for falsy values

This commit is contained in:
wycats
2010-12-21 09:46:50 -08:00
parent e0246d7dfc
commit 8fccd21283
+2 -2
View File
@@ -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; }