finish standardizing!
This commit is contained in:
parent
4e2f1311e0
commit
42e7ee2b4a
6 changed files with 22 additions and 13 deletions
|
@ -53,12 +53,11 @@ BrowserWindow.prototype._init = function () {
|
|||
this.webContents.on('page-title-updated', (event, title) => {
|
||||
// The page-title-updated event is not emitted immediately (see #3645), so
|
||||
// when the callback is called the BrowserWindow might have been closed.
|
||||
if (this.isDestroyed())
|
||||
return
|
||||
if (this.isDestroyed()) return
|
||||
|
||||
// Route the event to BrowserWindow.
|
||||
this.emit('page-title-updated', event, title)
|
||||
if (!event.defaultPrevented)
|
||||
this.setTitle(title)
|
||||
if (!event.defaultPrevented) this.setTitle(title)
|
||||
})
|
||||
|
||||
// Sometimes the webContents doesn't get focus when window is shown, so we have
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue