diff --git a/atom/browser/api/lib/browser-window.coffee b/atom/browser/api/lib/browser-window.coffee index 92a230ba45af..aa3bd022722c 100644 --- a/atom/browser/api/lib/browser-window.coffee +++ b/atom/browser/api/lib/browser-window.coffee @@ -66,6 +66,7 @@ BrowserWindow::_init = -> BrowserWindow.getFocusedWindow = -> windows = BrowserWindow.getAllWindows() return window for window in windows when window.isFocused() + null BrowserWindow.fromWebContents = (webContents) -> windows = BrowserWindow.getAllWindows() diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 577519951e2d..72fbd7fbeac0 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -289,7 +289,7 @@ Returns an array of all opened browser windows. ### `BrowserWindow.getFocusedWindow()` -Returns the window that is focused in this application. +Returns the window that is focused in this application, otherwise returns `null`. ### `BrowserWindow.fromWebContents(webContents)`