diff options
author | Yehuda Katz <wycats@gmail.com> | 2012-06-25 07:40:52 -0700 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2012-06-25 07:40:52 -0700 |
commit | ff1547ea049e5b4b499dfa8d4d450567a91f5505 (patch) | |
tree | 52b4dc55fefd9d2ef84dec09ee2e87aff192ad91 /lib/handlebars/compiler/compiler.js | |
parent | 0afc8b58d218d6220d5efdd2509754d13d9e1c55 (diff) | |
parent | 7a393a972ba20d88af0805f92c99fbdfd9db89ed (diff) | |
download | handlebars.js-ff1547ea049e5b4b499dfa8d4d450567a91f5505.zip handlebars.js-ff1547ea049e5b4b499dfa8d4d450567a91f5505.tar.gz handlebars.js-ff1547ea049e5b4b499dfa8d4d450567a91f5505.tar.bz2 |
Merge pull request #262 from naholyr/patch-1
FIX global leak
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r-- | lib/handlebars/compiler/compiler.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js index 20a558d..6807494 100644 --- a/lib/handlebars/compiler/compiler.js +++ b/lib/handlebars/compiler/compiler.js @@ -96,7 +96,7 @@ Handlebars.JavaScriptCompiler = function() {}; this.children[guid] = result; for(var i=0, l=result.depths.list.length; i<l; i++) { - depth = result.depths.list[i]; + var depth = result.depths.list[i]; if(depth < 2) { continue; } else { this.addDepth(depth - 1); } @@ -831,7 +831,7 @@ Handlebars.JavaScriptCompiler = function() {}; var programParams = [child.index, child.name, "data"]; for(var i=0, l = depths.length; i<l; i++) { - depth = depths[i]; + var depth = depths[i]; if(depth === 1) { programParams.push("depth0"); } else { programParams.push("depth" + (depth - 1)); } |