@@ -535,16 +535,22 @@ JavaScriptCompiler.prototype = {
535
535
this . resolvePath ( 'data' , parts , 0 , true , strict ) ;
536
536
} ,
537
537
538
- resolvePath : function ( type , parts , i , falsy , strict ) {
538
+ resolvePath : function ( type , parts , startPartIndex , falsy , strict ) {
539
539
if ( this . options . strict || this . options . assumeObjects ) {
540
540
this . push (
541
- strictLookup ( this . options . strict && strict , this , parts , i , type )
541
+ strictLookup (
542
+ this . options . strict && strict ,
543
+ this ,
544
+ parts ,
545
+ startPartIndex ,
546
+ type
547
+ )
542
548
) ;
543
549
return ;
544
550
}
545
551
546
552
let len = parts . length ;
547
- for ( ; i < len ; i ++ ) {
553
+ for ( let i = startPartIndex ; i < len ; i ++ ) {
548
554
/* eslint-disable no-loop-func */
549
555
this . replaceStack ( current => {
550
556
let lookup = this . nameLookup ( current , parts [ i ] , type ) ;
@@ -1263,14 +1269,14 @@ JavaScriptCompiler.isValidJavaScriptVariableName = function(name) {
1263
1269
) ;
1264
1270
} ;
1265
1271
1266
- function strictLookup ( requireTerminal , compiler , parts , i , type ) {
1272
+ function strictLookup ( requireTerminal , compiler , parts , startPartIndex , type ) {
1267
1273
let stack = compiler . popStack ( ) ,
1268
1274
len = parts . length ;
1269
1275
if ( requireTerminal ) {
1270
1276
len -- ;
1271
1277
}
1272
1278
1273
- for ( ; i < len ; i ++ ) {
1279
+ for ( let i = startPartIndex ; i < len ; i ++ ) {
1274
1280
stack = compiler . nameLookup ( stack , parts [ i ] , type ) ;
1275
1281
}
1276
1282
@@ -1280,7 +1286,7 @@ function strictLookup(requireTerminal, compiler, parts, i, type) {
1280
1286
'(' ,
1281
1287
stack ,
1282
1288
', ' ,
1283
- compiler . quotedString ( parts [ i ] ) ,
1289
+ compiler . quotedString ( parts [ len ] ) ,
1284
1290
', ' ,
1285
1291
JSON . stringify ( compiler . source . currentLocation ) ,
1286
1292
' )'
0 commit comments