fix: BrowserWindow.fromWebContents() can return null (#19983)
This commit is contained in:
parent
efe6e7b04d
commit
ead8f2bbcd
3 changed files with 7 additions and 4 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue