mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: BrowserWindow.fromWebContents() can return null (#19983)
This commit is contained in:
committed by
Shelley Vohr
parent
efe6e7b04d
commit
ead8f2bbcd
@@ -118,6 +118,8 @@ BrowserWindow.fromWebContents = (webContents) => {
|
||||
for (const window of BrowserWindow.getAllWindows()) {
|
||||
if (window.webContents.equal(webContents)) return window
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
BrowserWindow.fromBrowserView = (browserView) => {
|
||||
|
||||
Reference in New Issue
Block a user