@@ -571,7 +571,7 @@ function createArrayIterativeMethod (name, useTruthy = false) {
571571
572572 return selector [ name ] ( ( i , index ) => {
573573 const result = engine . run ( mapper , i , {
574- above : [ { item : selector , index } , context , above ]
574+ above : [ { iterator : selector , index } , context , above ]
575575 } )
576576 return useTruthy ? engine . truthy ( result ) : result
577577 } )
@@ -585,7 +585,7 @@ function createArrayIterativeMethod (name, useTruthy = false) {
585585 } ) ) || [ ]
586586 return asyncIterators [ name ] ( selector , ( i , index ) => {
587587 const result = engine . run ( mapper , i , {
588- above : [ { item : selector , index } , context , above ]
588+ above : [ { iterator : selector , index } , context , above ]
589589 } )
590590 return useTruthy ? engine . truthy ( result ) : result
591591 } )
@@ -603,16 +603,16 @@ function createArrayIterativeMethod (name, useTruthy = false) {
603603 }
604604
605605 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`
607607
608608 if ( async ) {
609609 if ( ! isSyncDeep ( mapper , buildState . engine , buildState ) ) {
610610 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 } ))`
612612 }
613613 }
614614
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 } ))`
616616 } ,
617617 traverse : false
618618 }
0 commit comments