Don't try to close the altText dialog if it's not open (PR 16977 follow-up)
				
					
				
			When closing a document in the viewer, e.g. by running `PDFViewerApplication.close()` in the console, the `AltTextManager.#finish` method currently throws *unless* the `altText` dialog is actually open. Similar to e.g. the PasswordPrompt, we should thus only attempt to close the `altText` dialog when it's open.
This commit is contained in:
		
							parent
							
								
									8d326e5e30
								
							
						
					
					
						commit
						21c55b56bf
					
				| @ -152,7 +152,7 @@ class AltTextManager { | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   #finish() { |   #finish() { | ||||||
|     if (this.#dialog) { |     if (this.#overlayManager.active === this.#dialog) { | ||||||
|       this.#overlayManager.close(this.#dialog); |       this.#overlayManager.close(this.#dialog); | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user