fix: inheritance of webPreferences sub properties
This commit is contained in:
parent
5a72441b2a
commit
7a514d26bb
1 changed files with 2 additions and 2 deletions
|
@ -27,11 +27,11 @@ const mergeOptions = function (child, parent, visited) {
|
||||||
for (const key in parent) {
|
for (const key in parent) {
|
||||||
if (key === 'isBrowserView') continue
|
if (key === 'isBrowserView') continue
|
||||||
if (!hasProp.call(parent, key)) continue
|
if (!hasProp.call(parent, key)) continue
|
||||||
if (key in child) continue
|
if (key in child && key !== 'webPreferences') continue
|
||||||
|
|
||||||
const value = parent[key]
|
const value = parent[key]
|
||||||
if (typeof value === 'object') {
|
if (typeof value === 'object') {
|
||||||
child[key] = mergeOptions({}, value, visited)
|
child[key] = mergeOptions(child[key] || {}, value, visited)
|
||||||
} else {
|
} else {
|
||||||
child[key] = value
|
child[key] = value
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue