diff options
author | 2019-10-04 21:52:27 +0200 | |
---|---|---|
committer | 2019-10-04 21:52:27 +0200 | |
commit | 44c4626e75b6271be4e672a2905693da7bad7397 (patch) | |
tree | 9b80c431fff41da122e838066ceb7cfdd7d00986 /src/components/services/content/ServiceWebview.js | |
parent | Revert "Update CHANGELOG.md" (diff) | |
download | ferdium-app-44c4626e75b6271be4e672a2905693da7bad7397.tar.gz ferdium-app-44c4626e75b6271be4e672a2905693da7bad7397.tar.zst ferdium-app-44c4626e75b6271be4e672a2905693da7bad7397.zip |
fix adding event listener when webview.view does not exist
Diffstat (limited to 'src/components/services/content/ServiceWebview.js')
-rw-r--r-- | src/components/services/content/ServiceWebview.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/components/services/content/ServiceWebview.js b/src/components/services/content/ServiceWebview.js index b3198d36a..4bab4a964 100644 --- a/src/components/services/content/ServiceWebview.js +++ b/src/components/services/content/ServiceWebview.js | |||
@@ -37,7 +37,9 @@ class ServiceWebview extends Component { | |||
37 | <ElectronWebView | 37 | <ElectronWebView |
38 | ref={(webview) => { | 38 | ref={(webview) => { |
39 | this.webview = webview; | 39 | this.webview = webview; |
40 | webview.view.addEventListener('did-stop-loading', this.refocusWebview); | 40 | if (webview && webview.view) { |
41 | webview.view.addEventListener('did-stop-loading', this.refocusWebview); | ||
42 | } | ||
41 | }} | 43 | }} |
42 | autosize | 44 | autosize |
43 | src={service.url} | 45 | src={service.url} |