diff --git a/atom/browser/api/lib/browser-window.coffee b/atom/browser/api/lib/browser-window.coffee index 92a230ba45a..aa3bd022722 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 8fb64b56122..c4df2887f6c 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -287,7 +287,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)`