fix: Incorrect warnings in webviews (#12234)
* 🔧 Get correct webContents * 🔧 Err, webPreferences
This commit is contained in:
parent
dd2c2660b9
commit
71795ecc62
1 changed files with 1 additions and 1 deletions
|
@ -84,7 +84,7 @@ const getWebPreferences = function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
const { remote } = require('electron')
|
const { remote } = require('electron')
|
||||||
webPreferences = remote.getCurrentWindow().webContents.getWebPreferences()
|
webPreferences = remote.getCurrentWebContents().getWebPreferences()
|
||||||
return webPreferences
|
return webPreferences
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return null
|
return null
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue