summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/code-gen.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2014-11-27 09:11:03 -0600
committerkpdecker <kpdecker@gmail.com>2014-11-27 09:11:03 -0600
commitf990cf006422fbcbbae7d8a8a866831e58300ea4 (patch)
tree5511ccfde2f01f1018f6a73576ef393590cf5d5a /lib/handlebars/compiler/code-gen.js
parent1124908d2a0d36493912eb2ce062545b1b5e5445 (diff)
downloadhandlebars.js-f990cf006422fbcbbae7d8a8a866831e58300ea4.zip
handlebars.js-f990cf006422fbcbbae7d8a8a866831e58300ea4.tar.gz
handlebars.js-f990cf006422fbcbbae7d8a8a866831e58300ea4.tar.bz2
Treat partial exec in a manner closer to helpers
This helps unify the code handling and will also be needed to support string/id tracking on partials.
Diffstat (limited to 'lib/handlebars/compiler/code-gen.js')
-rw-r--r--lib/handlebars/compiler/code-gen.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/handlebars/compiler/code-gen.js b/lib/handlebars/compiler/code-gen.js
index a7c1659..0fddb7c 100644
--- a/lib/handlebars/compiler/code-gen.js
+++ b/lib/handlebars/compiler/code-gen.js
@@ -113,7 +113,10 @@ CodeGen.prototype = {
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
- pairs.push([this.quotedString(key), ':', castChunk(obj[key], this)]);
+ var value = castChunk(obj[key], this);
+ if (value !== 'undefined') {
+ pairs.push([this.quotedString(key), ':', value]);
+ }
}
}