@@ -224,18 +224,15 @@ const finalize = (
224224 promise . then (
225225 ( ) => {
226226 iterator . push ( { hasNext : false } ) ;
227- const result = iterator . return ( undefined ) ;
228- result . then ( null , noop ) ;
227+ iterator . return ( undefined ) . then ( null , noop ) ;
229228 } ,
230229 ( e ) => {
231- const result = iterator . throw ( e ) ;
232- result . then ( null , noop ) ;
230+ iterator . throw ( e ) . then ( null , noop ) ;
233231 } ,
234232 ) ;
235233 } else {
236234 iterator . push ( { hasNext : false } ) ;
237- const result = iterator . return ( undefined ) ;
238- result . then ( null , noop ) ;
235+ iterator . return ( undefined ) . then ( null , noop ) ;
239236 }
240237
241238 return iterator ;
@@ -517,8 +514,7 @@ function executePreemptive(
517514 break ;
518515 }
519516 if ( ! next ) {
520- const result = iterator . throw ( new Error ( "Invalid iteration" ) ) ;
521- result . then ( null , noop ) ;
517+ iterator . throw ( new Error ( "Invalid iteration" ) ) . then ( null , noop ) ;
522518 break ;
523519 }
524520 const { done, value } = next ;
@@ -764,8 +760,7 @@ function newIterator<T = any>(
764760 } catch ( e ) {
765761 // ignore
766762 }
767- const result = this . throw ( e ) ;
768- result . then ( null , noop ) ;
763+ this . throw ( e ) . then ( null , noop ) ;
769764 } ,
770765 ) ;
771766 } else {
0 commit comments