diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/handlebars/compiler/javascript-compiler.js | 5 | ||||
-rw-r--r-- | lib/handlebars/runtime.js | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/handlebars/compiler/javascript-compiler.js b/lib/handlebars/compiler/javascript-compiler.js index b9b858d..a8544d5 100644 --- a/lib/handlebars/compiler/javascript-compiler.js +++ b/lib/handlebars/compiler/javascript-compiler.js @@ -123,7 +123,10 @@ JavaScriptCompiler.prototype = { ret.useData = true; } if (this.useDepths) { - ret.depths = true; + ret.useDepths = true; + } + if (this.options.compat) { + ret.compat = true; } if (!asObject) { diff --git a/lib/handlebars/runtime.js b/lib/handlebars/runtime.js index ec54f53..de6ea1b 100644 --- a/lib/handlebars/runtime.js +++ b/lib/handlebars/runtime.js @@ -40,7 +40,7 @@ export function template(templateSpec, env) { if (result == null && env.compile) { var options = { helpers: helpers, partials: partials, data: data }; - partials[name] = env.compile(partial, { data: data !== undefined }, env); + partials[name] = env.compile(partial, { data: data !== undefined, compat: templateSpec.compat }, env); result = partials[name](context, options); } if (result != null) { @@ -125,7 +125,7 @@ export function template(templateSpec, env) { data = initData(context, data); } var depths; - if (templateSpec.depths) { + if (templateSpec.useDepths) { depths = [context]; } |