refactor: try just using regular [Sync] for MessageSync (#20797)

This commit is contained in:
Jeremy Apthorp 2019-12-17 11:35:28 -08:00 committed by GitHub
parent 6cc9f0c34e
commit 54b4756a29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 106 deletions

View file

@ -116,7 +116,7 @@ BrowserWindow.getFocusedWindow = () => {
BrowserWindow.fromWebContents = (webContents) => {
for (const window of BrowserWindow.getAllWindows()) {
if (window.webContents.equal(webContents)) return window
if (window.webContents && window.webContents.equal(webContents)) return window
}
return null