Remove unnecessary work when merging options
This commit is contained in:
parent
e4d5ae53fc
commit
379bd79de4
1 changed files with 2 additions and 2 deletions
|
@ -47,14 +47,14 @@ const mergeBrowserWindowOptions = function (embedder, options) {
|
||||||
options.webPreferences = {}
|
options.webPreferences = {}
|
||||||
}
|
}
|
||||||
if (embedder.browserWindowOptions != null) {
|
if (embedder.browserWindowOptions != null) {
|
||||||
let parentOptions = {...embedder.browserWindowOptions}
|
let parentOptions = embedder.browserWindowOptions
|
||||||
|
|
||||||
// if parent's visibility is available, that overrides 'show' flag (#12125)
|
// if parent's visibility is available, that overrides 'show' flag (#12125)
|
||||||
const win = BrowserWindow.fromWebContents(embedder.webContents)
|
const win = BrowserWindow.fromWebContents(embedder.webContents)
|
||||||
if (win != null) {
|
if (win != null) {
|
||||||
const show = win.isVisible()
|
const show = win.isVisible()
|
||||||
if (typeof show === 'boolean') {
|
if (typeof show === 'boolean') {
|
||||||
parentOptions.show = show
|
parentOptions = {...embedder.browserWindowOptions, show: show}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue