Apply further ES6 bikeshedding
This commit is contained in:
Родитель
2d90e763ad
Коммит
e400585a0e
|
@ -52,10 +52,7 @@ const mergeBrowserWindowOptions = function (embedder, options) {
|
|||
// if parent's visibility is available, that overrides 'show' flag (#12125)
|
||||
const win = BrowserWindow.fromWebContents(embedder.webContents)
|
||||
if (win != null) {
|
||||
const show = win.isVisible()
|
||||
if (typeof show === 'boolean') {
|
||||
parentOptions = {...embedder.browserWindowOptions, show}
|
||||
}
|
||||
parentOptions = {...embedder.browserWindowOptions, show: win.isVisible()}
|
||||
}
|
||||
|
||||
// Inherit the original options if it is a BrowserWindow.
|
||||
|
|
|
@ -223,9 +223,9 @@ describe('chromium feature', () => {
|
|||
b = window.open(`file://${fixtures}/pages/window-open-size.html`, '', 'show=no')
|
||||
})
|
||||
|
||||
for (const show in [true, false]) {
|
||||
for (const show of [true, false]) {
|
||||
it(`inherits parent visibility over parent {show=${show}} option`, (done) => {
|
||||
let w = new BrowserWindow({show: show})
|
||||
const w = new BrowserWindow({show})
|
||||
|
||||
// toggle visibility
|
||||
if (show) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче