Browse Source

fix: inheritance of webPreferences sub properties

Samuel Attard 6 years ago
parent
commit
80221e52d9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/browser/guest-window-manager.js

+ 2 - 2
lib/browser/guest-window-manager.js

@@ -27,11 +27,11 @@ const mergeOptions = function (child, parent, visited) {
   for (const key in parent) {
     if (key === 'isBrowserView') continue
     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
     }