@@ -534,16 +534,22 @@ JavaScriptCompiler.prototype = {
534
534
this . resolvePath ( 'data' , parts , 0 , true , strict ) ;
535
535
} ,
536
536
537
- resolvePath : function ( type , parts , i , falsy , strict ) {
537
+ resolvePath : function ( type , parts , startPartIndex , falsy , strict ) {
538
538
if ( this . options . strict || this . options . assumeObjects ) {
539
539
this . push (
540
- strictLookup ( this . options . strict && strict , this , parts , i , type )
540
+ strictLookup (
541
+ this . options . strict && strict ,
542
+ this ,
543
+ parts ,
544
+ startPartIndex ,
545
+ type
546
+ )
541
547
) ;
542
548
return ;
543
549
}
544
550
545
551
let len = parts . length ;
546
- for ( ; i < len ; i ++ ) {
552
+ for ( let i = startPartIndex ; i < len ; i ++ ) {
547
553
/* eslint-disable no-loop-func */
548
554
this . replaceStack ( ( current ) => {
549
555
let lookup = this . nameLookup ( current , parts [ i ] , type ) ;
@@ -1155,14 +1161,14 @@ JavaScriptCompiler.isValidJavaScriptVariableName = function (name) {
1155
1161
) ;
1156
1162
} ;
1157
1163
1158
- function strictLookup ( requireTerminal , compiler , parts , i , type ) {
1164
+ function strictLookup ( requireTerminal , compiler , parts , startPartIndex , type ) {
1159
1165
let stack = compiler . popStack ( ) ,
1160
1166
len = parts . length ;
1161
1167
if ( requireTerminal ) {
1162
1168
len -- ;
1163
1169
}
1164
1170
1165
- for ( ; i < len ; i ++ ) {
1171
+ for ( let i = startPartIndex ; i < len ; i ++ ) {
1166
1172
stack = compiler . nameLookup ( stack , parts [ i ] , type ) ;
1167
1173
}
1168
1174
@@ -1172,7 +1178,7 @@ function strictLookup(requireTerminal, compiler, parts, i, type) {
1172
1178
'(' ,
1173
1179
stack ,
1174
1180
', ' ,
1175
- compiler . quotedString ( parts [ i ] ) ,
1181
+ compiler . quotedString ( parts [ len ] ) ,
1176
1182
', ' ,
1177
1183
JSON . stringify ( compiler . source . currentLocation ) ,
1178
1184
' )' ,
0 commit comments