From 7630ac6e90a2186266acb619c240cfa31441981e Mon Sep 17 00:00:00 2001 From: Felix Rieseberg Date: Wed, 22 Nov 2017 15:48:11 -0800 Subject: [PATCH] :wrench: Return null if not found --- lib/browser/api/browser-window.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/browser/api/browser-window.js b/lib/browser/api/browser-window.js index 2d119770dab..b977e8766f9 100644 --- a/lib/browser/api/browser-window.js +++ b/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) => {