Browse Source

fix: Incorrect warnings in webviews (#12234)

* :wrench: Get correct webContents

* :wrench: Err, webPreferences
Felix Rieseberg 7 years ago
parent
commit
71795ecc62
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/renderer/security-warnings.js

+ 1 - 1
lib/renderer/security-warnings.js

@@ -84,7 +84,7 @@ const getWebPreferences = function () {
     }
 
     const { remote } = require('electron')
-    webPreferences = remote.getCurrentWindow().webContents.getWebPreferences()
+    webPreferences = remote.getCurrentWebContents().getWebPreferences()
     return webPreferences
   } catch (error) {
     return null