]> khamidou — GitHub mirrors - electron.git/commitdiff
spec: Check existence of webview before removing it
authorCheng Zhao <zcbenz@gmail.com>
Tue, 15 Sep 2015 05:45:26 +0000 (13:45 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 15 Sep 2015 05:45:26 +0000 (13:45 +0800)
spec/webview-spec.coffee

index ddb203399b8e3edc01571d2dc7ed6e66c47ff7a2..e4b40c28ebeb5853eb3e454224f517ab4911c8a3 100644 (file)
@@ -11,7 +11,7 @@ describe '<webview> tag', ->
   beforeEach ->
     webview = new WebView
   afterEach ->
-    document.body.removeChild webview
+    document.body.removeChild(webview) if document.body.contains(webview)
 
   describe 'src attribute', ->
     it 'specifies the page to load', (done) ->