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 () {
|
||||
if (!document.body.contains(webview)) {
|
||||
document.body.appendChild(webview)
|
||||
if (webview != null) {
|
||||
if (!document.body.contains(webview)) {
|
||||
document.body.appendChild(webview)
|
||||
}
|
||||
webview.remove()
|
||||
}
|
||||
webview.remove()
|
||||
|
||||
return closeWindow(w).then(function () { w = null })
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue