mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Backport - fix: Incorrect warnings in webviews (#12236)
* 🔧 Get correct webContents * 🔧 Err, webPreferences
This commit is contained in:
committed by
Charles Kerr
parent
af4dfcf6fe
commit
515fbb6fc3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user