@@ -637,7 +637,7 @@ function createArrayIterativeMethod (name, useTruthy = false) {
637637
638638 return selector [ name ] ( ( i , index ) => {
639639 const result = engine . run ( mapper , i , {
640- above : [ { item : selector , index } , context , above ]
640+ above : [ { iterator : selector , index } , context , above ]
641641 } )
642642 return useTruthy ? engine . truthy ( result ) : result
643643 } )
@@ -651,7 +651,7 @@ function createArrayIterativeMethod (name, useTruthy = false) {
651651 } ) ) || [ ]
652652 return asyncIterators [ name ] ( selector , ( i , index ) => {
653653 const result = engine . run ( mapper , i , {
654- above : [ { item : selector , index } , context , above ]
654+ above : [ { iterator : selector , index } , context , above ]
655655 } )
656656 return useTruthy ? engine . truthy ( result ) : result
657657 } )
@@ -669,16 +669,16 @@ function createArrayIterativeMethod (name, useTruthy = false) {
669669 }
670670
671671 const method = build ( mapper , mapState )
672- const aboveArray = method . aboveDetected ? buildState . compile `[{ item: null , index: x }, context, above]` : buildState . compile `null`
672+ const aboveArray = method . aboveDetected ? buildState . compile `[{ iterator: z , index: x }, context, above]` : buildState . compile `null`
673673
674674 if ( async ) {
675675 if ( ! isSyncDeep ( mapper , buildState . engine , buildState ) ) {
676676 buildState . detectAsync = true
677- return buildState . compile `await asyncIterators[${ name } ](${ selector } || [], async (i, x) => ${ method } (i, x, ${ aboveArray } ))`
677+ return buildState . compile `await asyncIterators[${ name } ](${ selector } || [], async (i, x, z ) => ${ method } (i, x, ${ aboveArray } ))`
678678 }
679679 }
680680
681- return buildState . compile `(${ selector } || [])[${ name } ]((i, x) => ${ method } (i, x, ${ aboveArray } ))`
681+ return buildState . compile `(${ selector } || [])[${ name } ]((i, x, z ) => ${ method } (i, x, ${ aboveArray } ))`
682682 } ,
683683 traverse : false
684684 }
0 commit comments