Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
skip over master brave window when querying brave/browser-laptop#8811
Browse files Browse the repository at this point in the history
filter master brave window on windowId when querying brave/browser-laptop#8811
  • Loading branch information
kevinlawler committed May 12, 2017
1 parent c81548c commit 9b2a14d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/browser/api/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,11 @@ const tabsQuery = function (queryInfo = {}, useCurrentWindowId = false) {

var result = []
tabIds.forEach((tabId) => {
// never add the master Brave container window
if (tabValues[tabId].windowId === -1) {
return
}

// delete tab from the list if any key doesn't match
if (!queryKeys.map((queryKey) => (tabValues[tabId][queryKey] === queryInfo[queryKey])).includes(false)) {
result.push(tabValues[tabId])
Expand Down

0 comments on commit 9b2a14d

Please sign in to comment.