Relax depth check for context push

Fixes #1135
This commit is contained in:
kpdecker
2015-12-12 15:27:56 -06:00
parent 63a08890cc
commit 25458fdc2a
2 changed files with 25 additions and 2 deletions
+2 -2
View File
@@ -137,7 +137,7 @@ export function template(templateSpec, env) {
blockParams = templateSpec.useBlockParams ? [] : undefined;
if (templateSpec.useDepths) {
if (options.depths) {
depths = context !== options.depths[0] ? [context].concat(options.depths) : options.depths;
depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths;
} else {
depths = [context];
}
@@ -174,7 +174,7 @@ export function template(templateSpec, env) {
export function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
function prog(context, options = {}) {
let currentDepths = depths;
if (depths && context !== depths[0]) {
if (depths && context != depths[0]) {
currentDepths = [context].concat(depths);
}