File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -907,7 +907,6 @@ async function completeAsyncIteratorValue(
907907 let containsPromise = false ;
908908 const completedResults : Array < unknown > = [ ] ;
909909 let index = 0 ;
910- const earlyReturn = asyncIterator . return ?. bind ( asyncIterator ) ;
911910 try {
912911 while ( true ) {
913912 const itemPath = addPath ( path , index , undefined ) ;
@@ -964,12 +963,10 @@ async function completeAsyncIteratorValue(
964963 index ++ ;
965964 }
966965 } catch ( error ) {
967- if ( earlyReturn !== undefined ) {
968- earlyReturn ( ) . catch ( ( ) => {
969- /* c8 ignore next 1 */
970- // ignore error
971- } ) ;
972- }
966+ asyncIterator . return ?.( ) . catch ( ( ) => {
967+ /* c8 ignore next 1 */
968+ // ignore error
969+ } ) ;
973970 throw error ;
974971 }
975972 return containsPromise ? Promise . all ( completedResults ) : completedResults ;
You can’t perform that action at this time.
0 commit comments