diff options
author | kpdecker <kpdecker@gmail.com> | 2013-05-28 17:03:07 -0400 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2013-05-28 17:03:07 -0400 |
commit | 3ddbc5237f5208f40a7d438895fe2249bdf343b9 (patch) | |
tree | 492e9a4098f12b5b0a46035f40fa37abcabe8358 /lib/handlebars/compiler/compiler.js | |
parent | 503e32208bcc9e9f5d9052b4a7e732bf707be15e (diff) | |
download | handlebars.js-3ddbc5237f5208f40a7d438895fe2249bdf343b9.zip handlebars.js-3ddbc5237f5208f40a7d438895fe2249bdf343b9.tar.gz handlebars.js-3ddbc5237f5208f40a7d438895fe2249bdf343b9.tar.bz2 |
Protect from object prototype modifications
Fixes #534
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r-- | lib/handlebars/compiler/compiler.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js index d40e5f8..7777456 100644 --- a/lib/handlebars/compiler/compiler.js +++ b/lib/handlebars/compiler/compiler.js @@ -538,7 +538,9 @@ JavaScriptCompiler.prototype = { // Generate minimizer alias mappings if (!this.isChild) { for (var alias in this.context.aliases) { - this.source[1] = this.source[1] + ', ' + alias + '=' + this.context.aliases[alias]; + if (this.context.aliases.hasOwnProperty(alias)) { + this.source[1] = this.source[1] + ', ' + alias + '=' + this.context.aliases[alias]; + } } } |