diff --git a/lib/browser/api/browser-window.ts b/lib/browser/api/browser-window.ts index 6acaa571e0..9b1e878d9e 100644 --- a/lib/browser/api/browser-window.ts +++ b/lib/browser/api/browser-window.ts @@ -93,7 +93,7 @@ BrowserWindow.fromWebContents = (webContents: WebContents) => { BrowserWindow.fromBrowserView = (browserView: BrowserView) => { const { webContents } = browserView; if (!webContents) return null; - return BrowserWindow.fromWebContents(browserView.webContents); + return BrowserWindow.fromWebContents(webContents); }; BrowserWindow.prototype.setTouchBar = function (touchBar) {