diff --git a/lib/browser/guest-window-manager.js b/lib/browser/guest-window-manager.js index 132b5503f3..88871dc58b 100644 --- a/lib/browser/guest-window-manager.js +++ b/lib/browser/guest-window-manager.js @@ -141,13 +141,13 @@ const getGuestWindow = function (guestId) { ipcMain.on('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_OPEN', function (event, url, frameName, disposition, options, additionalFeatures) { options = mergeBrowserWindowOptions(event.sender, options) event.sender.emit('new-window', event, url, frameName, disposition, options, additionalFeatures) - var newGuest = event.newGuest + const newGuest = event.newGuest if ((event.sender.isGuest() && !event.sender.allowPopups) || event.defaultPrevented) { - if (newGuest != undefined && newGuest != null) { + if (newGuest != undefined && newGuest != null) { event.returnValue = setupGuest(event.sender, frameName, newGuest) - } else { + } else { event.returnValue = null - } + } } else { event.returnValue = createGuest(event.sender, url, frameName, options) }