Browse Source

:wrench: Return null if not found

Felix Rieseberg 7 years ago
parent
commit
7630ac6e90
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lib/browser/api/browser-window.js

+ 2 - 0
lib/browser/api/browser-window.js

@@ -148,6 +148,8 @@ BrowserWindow.fromBrowserView = (browserView) => {
   for (const window of BrowserWindow.getAllWindows()) {
     if (window.getBrowserView() === browserView) return window
   }
+
+  return null
 }
 
 BrowserWindow.fromDevToolsWebContents = (webContents) => {