Only call getDevTools for windows that have devtools.
This commit is contained in:
parent
e8bf798b52
commit
822bc2fd52
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ BrowserWindow.fromProcessIdAndRoutingId = (processId, routingId) ->
|
||||||
|
|
||||||
BrowserWindow.fromDevTools = (processId, routingId) ->
|
BrowserWindow.fromDevTools = (processId, routingId) ->
|
||||||
windows = BrowserWindow.getAllWindows()
|
windows = BrowserWindow.getAllWindows()
|
||||||
for window in windows
|
for window in windows when window.isDevToolsOpened()
|
||||||
devtools = window.getDevTools()
|
devtools = window.getDevTools()
|
||||||
return window if devtools.processId == processId and
|
return window if devtools.processId == processId and
|
||||||
devtools.routingId == routingId
|
devtools.routingId == routingId
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue