Skip Promise.all in PDFViewerApplication._parseHashParameters unless actually necessary
				
					
				
			Given that only two debugging hash parameters (i.e. `disableWorker` and `pdfBug`) will make this method asynchronous, we can avoid what's most of the time is an unnecessary `Promise.all` invocation.
This commit is contained in:
		
							parent
							
								
									a06f487bd4
								
							
						
					
					
						commit
						4886a7cf69
					
				@ -385,6 +385,9 @@ const PDFViewerApplication = {
 | 
			
		||||
      AppOptions.set("locale", hashParams.locale);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (waitOn.length === 0) {
 | 
			
		||||
      return undefined;
 | 
			
		||||
    }
 | 
			
		||||
    return Promise.all(waitOn).catch(reason => {
 | 
			
		||||
      console.error(`_parseHashParameters: "${reason.message}".`);
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user