Only remove webview when non-null
This commit is contained in:
		
					parent
					
						
							
								b0ee46f862
							
						
					
				
			
			
				commit
				
					
						cc183524fd
					
				
			
		
					 1 changed files with 5 additions and 3 deletions
				
			
		|  | @ -25,10 +25,12 @@ describe('session module', function () { | ||||||
|   }) |   }) | ||||||
| 
 | 
 | ||||||
|   afterEach(function () { |   afterEach(function () { | ||||||
|     if (!document.body.contains(webview)) { |     if (webview != null) { | ||||||
|       document.body.appendChild(webview) |       if (!document.body.contains(webview)) { | ||||||
|  |         document.body.appendChild(webview) | ||||||
|  |       } | ||||||
|  |       webview.remove() | ||||||
|     } |     } | ||||||
|     webview.remove() |  | ||||||
| 
 | 
 | ||||||
|     return closeWindow(w).then(function () { w = null }) |     return closeWindow(w).then(function () { w = null }) | ||||||
|   }) |   }) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Kevin Sawicki
				Kevin Sawicki