Backport - fix: Incorrect warnings in webviews (#12236)

* 🔧 Get correct webContents

* 🔧 Err, webPreferences
This commit is contained in:
trop-devel[bot]
2018-03-13 11:34:32 +09:00
committed by Charles Kerr
parent af4dfcf6fe
commit 515fbb6fc3

View File

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