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 @@ -908,7 +908,6 @@ async function completeAsyncIteratorValue(
908908 let containsPromise = false ;
909909 const completedResults : Array < unknown > = [ ] ;
910910 let index = 0 ;
911- const earlyReturn = asyncIterator . return ?. bind ( asyncIterator ) ;
912911 try {
913912 while ( true ) {
914913 const itemPath = addPath ( path , index , undefined ) ;
@@ -965,12 +964,10 @@ async function completeAsyncIteratorValue(
965964 index ++ ;
966965 }
967966 } catch ( error ) {
968- if ( earlyReturn !== undefined ) {
969- earlyReturn ( ) . catch ( ( ) => {
970- /* c8 ignore next 1 */
971- // ignore error
972- } ) ;
973- }
967+ asyncIterator . return ?.( ) . catch ( ( ) => {
968+ /* c8 ignore next 1 */
969+ // ignore error
970+ } ) ;
974971 throw error ;
975972 }
976973 return containsPromise ? Promise . all ( completedResults ) : completedResults ;
You can’t perform that action at this time.
0 commit comments