fix: inheritance of webPreferences sub properties

This commit is contained in:
Samuel Attard
2018-08-22 12:21:53 -05:00
committed by Charles Kerr
parent 8ebd0ce1b1
commit 519a02d8d4

View File

@@ -26,11 +26,11 @@ const mergeOptions = function (child, parent, visited) {
visited.add(parent)
for (const key in parent) {
if (!hasProp.call(parent, key)) continue
if (key in child) continue
if (key in child && key !== 'webPreferences') continue
const value = parent[key]
if (typeof value === 'object') {
child[key] = mergeOptions({}, value, visited)
child[key] = mergeOptions(child[key] || {}, value, visited)
} else {
child[key] = value
}