mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Only call getDevTools for windows that have devtools.
This commit is contained in:
@@ -57,7 +57,7 @@ BrowserWindow.fromProcessIdAndRoutingId = (processId, routingId) ->
|
||||
|
||||
BrowserWindow.fromDevTools = (processId, routingId) ->
|
||||
windows = BrowserWindow.getAllWindows()
|
||||
for window in windows
|
||||
for window in windows when window.isDevToolsOpened()
|
||||
devtools = window.getDevTools()
|
||||
return window if devtools.processId == processId and
|
||||
devtools.routingId == routingId
|
||||
|
||||
Reference in New Issue
Block a user