summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/ast.js
diff options
context:
space:
mode:
authorMartin Muñoz <im.mmun@gmail.com>2014-05-05 01:51:29 -0400
committerMartin Muñoz <im.mmun@gmail.com>2014-05-05 01:51:29 -0400
commit356ea1a9093f0ab418a383f366e27bb0ad055db9 (patch)
tree12814f9e83d351c02393baa1a9854869cc39dfaf /lib/handlebars/compiler/ast.js
parent085e5e1937b442a4d4add5525db2627e825538aa (diff)
downloadhandlebars.js-356ea1a9093f0ab418a383f366e27bb0ad055db9.zip
handlebars.js-356ea1a9093f0ab418a383f366e27bb0ad055db9.tar.gz
handlebars.js-356ea1a9093f0ab418a383f366e27bb0ad055db9.tar.bz2
Ensure isHelper is coerced to a boolean
Diffstat (limited to 'lib/handlebars/compiler/ast.js')
-rw-r--r--lib/handlebars/compiler/ast.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/handlebars/compiler/ast.js b/lib/handlebars/compiler/ast.js
index 286917d..e388e54 100644
--- a/lib/handlebars/compiler/ast.js
+++ b/lib/handlebars/compiler/ast.js
@@ -86,7 +86,7 @@ var AST = {
// a mustache is definitely a helper if:
// * it is an eligible helper, and
// * it has at least one parameter or hash segment
- this.isHelper = params.length || hash;
+ this.isHelper = !!(params.length || hash);
// a mustache is an eligible helper if:
// * its id is simple (a single part, not `this` or `..`)