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

ignore the main window
  • Loading branch information
kevinlawler authored and hferreiro committed Jun 29, 2017
1 parent b500eac commit d13b265
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].url.startsWith('chrome://brave')) {
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 d13b265

Please sign in to comment.