Only remove webview when non-null

This commit is contained in:
Kevin Sawicki 2016-12-19 16:37:47 -08:00 committed by Birunthan Mohanathas
parent b0ee46f862
commit cc183524fd

View file

@ -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 })
})