File tree Expand file tree Collapse file tree 8 files changed +142
-142
lines changed 
chrome/elements/compose-modules Expand file tree Collapse file tree 8 files changed +142
-142
lines changed Original file line number Diff line number Diff line change @@ -313,7 +313,7 @@ export class ComposeRecipientsModule extends ViewModule<ComposeView> {
313313        } ,  0 ) ; 
314314      } ) ( ) ; 
315315    } 
316-     await  Promise . all ( recipientEls . map ( r  =>  r . evaluating ) ) ; 
316+     await  Promise . all ( recipientEls . map ( r  =>  r . evaluating ) . filter ( ( p ) :  p  is  Promise < void >   =>   p   !==   undefined ) ) ; 
317317    if  ( triggerCallback )  { 
318318      for  ( const  callback  of  this . onRecipientAddedCallbacks )  { 
319319        callback ( recipientEls ) ; 
@@ -405,7 +405,7 @@ export class ComposeRecipientsModule extends ViewModule<ComposeView> {
405405    if  ( this . view . S . cached ( 'input_addresses_container_outer' ) . hasClass ( 'invisible' ) )  { 
406406      return ; 
407407    } 
408-     await  Promise . all ( this . addedRecipients . map ( r  =>  r . evaluating ) ) ;  // Wait until all recipients loaded. 
408+     await  Promise . all ( this . addedRecipients . map ( r  =>  r . evaluating ) . filter ( ( p ) :  p  is  Promise < void >   =>   p   !==   undefined ) ) ;  // Wait until all recipients loaded. 
409409    this . showHideCcAndBccInputsIfNeeded ( ) ; 
410410    this . view . S . cached ( 'input_addresses_container_outer' ) . addClass ( 'invisible' ) ; 
411411    this . view . S . cached ( 'recipients_placeholder' ) . css ( 'display' ,  'flex' ) ; 
Original file line number Diff line number Diff line change @@ -476,12 +476,12 @@ export class ComposeRenderModule extends ViewModule<ComposeView> {
476476  } ; 
477477
478478  private  loadRecipientsThenSetTestStateReady  =  async  ( )  =>  { 
479-     await   Promise . all ( 
480-       this . view . recipientsModule 
481-          . getRecipients ( ) 
482-          . filter ( r  =>  r . evaluating ) 
483-          . map ( r   =>  r . evaluating ) 
484-     ) ; 
479+     const   evaluatingPromises   =   this . view . recipientsModule 
480+       . getRecipients ( ) 
481+       . filter ( r   =>   r . evaluating ) 
482+       . map ( r  =>  r . evaluating ) 
483+       . filter ( ( p ) :  p  is  Promise < void >   =>  p   !==   undefined ) ; 
484+     await   Promise . all ( evaluatingPromises ) ; 
485485    document . querySelector ( 'body' ) ?. setAttribute ( 'data-test-state' ,  'ready' ) ;  // set as ready so that automated tests can evaluate results 
486486  } ; 
487487
Original file line number Diff line number Diff line change @@ -413,11 +413,9 @@ export class Gmail extends EmailProviderApi implements EmailProviderInterface {
413413      } 
414414    } 
415415    const  rawValidEmails  =  rawParsedResults . filter ( r  =>  r . address  &&  Str . isEmailValid ( r . address ) ) ; 
416-     const  newValidResults : EmailProviderContact [ ]  =  await  Promise . all ( 
417-       rawValidEmails . map ( a  =>  { 
418-         return  {  email : a . address ! ,  name : a . name  } ;  // eslint-disable-line @typescript-eslint/no-non-null-assertion 
419-       } ) 
420-     ) ; 
416+     const  newValidResults : EmailProviderContact [ ]  =  rawValidEmails . map ( a  =>  { 
417+       return  {  email : a . address ! ,  name : a . name  } ;  // eslint-disable-line @typescript-eslint/no-non-null-assertion 
418+     } ) ; 
421419    const  uniqueNewValidResults : EmailProviderContact [ ]  =  [ ] ; 
422420    for  ( const  newValidRes  of  newValidResults )  { 
423421      if  ( ! allResults . map ( c  =>  c . email ) . includes ( newValidRes . email ) )  { 
Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ export class Api {
252252            } ) , 
253253          } ; 
254254        }  else  { 
255-           return  {  response,  pipe : Value . noop  } ;  // original response 
255+           return  {  response,  pipe : async   ( )   =>   {   /* no-op */   }  } ;  // original response 
256256        } 
257257      } ; 
258258
Original file line number Diff line number Diff line change @@ -350,7 +350,9 @@ export class OpenPGPKey {
350350    result . set ( `Primary key expiration?` ,  await  KeyUtil . formatResultAsync ( async  ( )  =>  OpenPGPKey . formatDate ( await  key . getExpirationTime ( ) ) ) ) ; 
351351    result . set ( `Primary key getBitSize?` ,  await  KeyUtil . formatResultAsync ( async  ( )  =>  key . getAlgorithmInfo ( ) . bits ) ) ; 
352352    const  encryptResult  =  await  OpenPGPKey . testEncryptDecrypt ( key ) ; 
353-     await  Promise . all ( encryptResult . map ( msg  =>  result . set ( `Encrypt/Decrypt test: ${ msg }  ` ,  '' ) ) ) ; 
353+     for  ( const  msg  of  encryptResult )  { 
354+       result . set ( `Encrypt/Decrypt test: ${ msg }  ` ,  '' ) ; 
355+     } 
354356    if  ( key . isPrivate ( ) )  { 
355357      result . set ( `Sign/Verify test` ,  await  KeyUtil . formatResultAsync ( async  ( )  =>  await  OpenPGPKey . testSignVerify ( key ) ) ) ; 
356358    } 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments