summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/compiler.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2013-01-13 23:43:29 -0600
committerkpdecker <kpdecker@gmail.com>2013-01-13 23:43:29 -0600
commit24fc3a2288d788488e056cbaa0f13503e2607e1b (patch)
treeed8a6513710e2e17b93ff145bcf093fd8972f209 /lib/handlebars/compiler/compiler.js
parent8961298859c42b3158dba7fa40b716cd2d63ef98 (diff)
downloadhandlebars.js-24fc3a2288d788488e056cbaa0f13503e2607e1b.zip
handlebars.js-24fc3a2288d788488e056cbaa0f13503e2607e1b.tar.gz
handlebars.js-24fc3a2288d788488e056cbaa0f13503e2607e1b.tar.bz2
Prevent write on all depth variables
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r--lib/handlebars/compiler/compiler.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js
index 97e8c91..48a3db5 100644
--- a/lib/handlebars/compiler/compiler.js
+++ b/lib/handlebars/compiler/compiler.js
@@ -897,7 +897,7 @@ Handlebars.JavaScriptCompiler = function() {};
item = callback.call(this, stack);
// Prevent modification of the context depth variable. Through replaceStack
- if (this.compileStack.length <= 1) {
+ if (/^depth/.test(stack)) {
stack = this.nextStack();
}