@@ -571,7 +571,7 @@ function createArrayIterativeMethod (name, useTruthy = false) {
571
571
572
572
return selector [ name ] ( ( i , index ) => {
573
573
const result = engine . run ( mapper , i , {
574
- above : [ { item : selector , index } , context , above ]
574
+ above : [ { iterator : selector , index } , context , above ]
575
575
} )
576
576
return useTruthy ? engine . truthy ( result ) : result
577
577
} )
@@ -585,7 +585,7 @@ function createArrayIterativeMethod (name, useTruthy = false) {
585
585
} ) ) || [ ]
586
586
return asyncIterators [ name ] ( selector , ( i , index ) => {
587
587
const result = engine . run ( mapper , i , {
588
- above : [ { item : selector , index } , context , above ]
588
+ above : [ { iterator : selector , index } , context , above ]
589
589
} )
590
590
return useTruthy ? engine . truthy ( result ) : result
591
591
} )
@@ -603,16 +603,16 @@ function createArrayIterativeMethod (name, useTruthy = false) {
603
603
}
604
604
605
605
const method = build ( mapper , mapState )
606
- const aboveArray = method . aboveDetected ? buildState . compile `[{ item: null }, context, above]` : buildState . compile `null`
606
+ const aboveArray = method . aboveDetected ? buildState . compile `[{ iterator: z, index: x }, context, above]` : buildState . compile `null`
607
607
608
608
if ( async ) {
609
609
if ( ! isSyncDeep ( mapper , buildState . engine , buildState ) ) {
610
610
buildState . detectAsync = true
611
- return buildState . compile `await asyncIterators[${ name } ](${ selector } || [], async (i, x) => ${ method } (i, x, ${ aboveArray } ))`
611
+ return buildState . compile `await asyncIterators[${ name } ](${ selector } || [], async (i, x, z ) => ${ method } (i, x, ${ aboveArray } ))`
612
612
}
613
613
}
614
614
615
- return buildState . compile `(${ selector } || [])[${ name } ]((i, x) => ${ method } (i, x, ${ aboveArray } ))`
615
+ return buildState . compile `(${ selector } || [])[${ name } ]((i, x, z ) => ${ method } (i, x, ${ aboveArray } ))`
616
616
} ,
617
617
traverse : false
618
618
}
0 commit comments