@@ -20,7 +20,7 @@ JavaScriptCompiler.prototype = {
2020 }
2121 } ,
2222 depthedLookup : function ( name ) {
23- return [ this . aliasable ( 'this .lookup' ) , '(depths, "' , name , '")' ] ;
23+ return [ this . aliasable ( 'container .lookup' ) , '(depths, "' , name , '")' ] ;
2424 } ,
2525
2626 compilerInfo : function ( ) {
@@ -189,7 +189,7 @@ JavaScriptCompiler.prototype = {
189189 }
190190 }
191191
192- let params = [ 'depth0' , 'helpers' , 'partials' , 'data' ] ;
192+ let params = [ 'container' , ' depth0', 'helpers' , 'partials' , 'data' ] ;
193193
194194 if ( this . useBlockParams || this . useDepths ) {
195195 params . push ( 'blockParams' ) ;
@@ -359,7 +359,7 @@ JavaScriptCompiler.prototype = {
359359 // Escape `value` and append it to the buffer
360360 appendEscaped : function ( ) {
361361 this . pushSource ( this . appendToBuffer (
362- [ this . aliasable ( 'this .escapeExpression' ) , '(' , this . popStack ( ) , ')' ] ) ) ;
362+ [ this . aliasable ( 'container .escapeExpression' ) , '(' , this . popStack ( ) , ')' ] ) ) ;
363363 } ,
364364
365365 // [getContext]
@@ -428,7 +428,7 @@ JavaScriptCompiler.prototype = {
428428 if ( ! depth ) {
429429 this . pushStackLiteral ( 'data' ) ;
430430 } else {
431- this . pushStackLiteral ( 'this .data(data, ' + depth + ')' ) ;
431+ this . pushStackLiteral ( 'container .data(data, ' + depth + ')' ) ;
432432 }
433433
434434 this . resolvePath ( 'data' , parts , 0 , true , strict ) ;
@@ -466,7 +466,7 @@ JavaScriptCompiler.prototype = {
466466 // If the `value` is a lambda, replace it on the stack by
467467 // the return value of the lambda
468468 resolvePossibleLambda : function ( ) {
469- this . push ( [ this . aliasable ( 'this .lambda' ) , '(' , this . popStack ( ) , ', ' , this . contextName ( 0 ) , ')' ] ) ;
469+ this . push ( [ this . aliasable ( 'container .lambda' ) , '(' , this . popStack ( ) , ', ' , this . contextName ( 0 ) , ')' ] ) ;
470470 } ,
471471
472472 // [pushStringParam]
@@ -669,7 +669,7 @@ JavaScriptCompiler.prototype = {
669669 options = this . objectLiteral ( options ) ;
670670 params . push ( options ) ;
671671
672- this . push ( this . source . functionCall ( 'this .invokePartial' , '' , params ) ) ;
672+ this . push ( this . source . functionCall ( 'container .invokePartial' , '' , params ) ) ;
673673 } ,
674674
675675 // [assignToHash]
@@ -771,7 +771,7 @@ JavaScriptCompiler.prototype = {
771771 programParams . push ( 'depths' ) ;
772772 }
773773
774- return 'this .program(' + programParams . join ( ', ' ) + ')' ;
774+ return 'container .program(' + programParams . join ( ', ' ) + ')' ;
775775 } ,
776776
777777 useRegister : function ( name ) {
@@ -965,8 +965,8 @@ JavaScriptCompiler.prototype = {
965965 // Avoid setting fn and inverse if neither are set. This allows
966966 // helpers to do a check for `if (options.fn)`
967967 if ( program || inverse ) {
968- options . fn = program || 'this .noop' ;
969- options . inverse = inverse || 'this .noop' ;
968+ options . fn = program || 'container .noop' ;
969+ options . inverse = inverse || 'container .noop' ;
970970 }
971971
972972 // The parameters go on to the stack in order (making sure that they are evaluated in order)
@@ -1061,7 +1061,7 @@ function strictLookup(requireTerminal, compiler, parts, type) {
10611061 }
10621062
10631063 if ( requireTerminal ) {
1064- return [ compiler . aliasable ( 'this .strict' ) , '(' , stack , ', ' , compiler . quotedString ( parts [ i ] ) , ')' ] ;
1064+ return [ compiler . aliasable ( 'container .strict' ) , '(' , stack , ', ' , compiler . quotedString ( parts [ i ] ) , ')' ] ;
10651065 } else {
10661066 return stack ;
10671067 }
0 commit comments