File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -947,7 +947,6 @@ async function completeAsyncIteratorValue(
947947 let containsPromise = false ;
948948 const completedResults : Array < unknown > = [ ] ;
949949 let index = 0 ;
950- const earlyReturn = asyncIterator . return ?. bind ( asyncIterator ) ;
951950 try {
952951 while ( true ) {
953952 const itemPath = addPath ( path , index , undefined ) ;
@@ -996,12 +995,10 @@ async function completeAsyncIteratorValue(
996995 index ++ ;
997996 }
998997 } catch ( error ) {
999- if ( earlyReturn !== undefined ) {
1000- earlyReturn ( ) . catch ( ( ) => {
1001- /* c8 ignore next 1 */
1002- // ignore error
1003- } ) ;
1004- }
998+ asyncIterator . return ?.( ) . catch ( ( ) => {
999+ /* c8 ignore next 1 */
1000+ // ignore error
1001+ } ) ;
10051002 throw error ;
10061003 }
10071004 return containsPromise ? Promise . all ( completedResults ) : completedResults ;
You can’t perform that action at this time.
0 commit comments