From b3eaedcf215b45fa4a09f055fc03632883300fe2 Mon Sep 17 00:00:00 2001 From: kevinlawler Date: Thu, 11 May 2017 15:43:15 -0700 Subject: [PATCH] skip over master brave window when querying brave/browser-laptop#8811 filter master brave window on windowId when querying brave/browser-laptop#8811 ignore the main window --- lib/browser/api/extensions.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/browser/api/extensions.js b/lib/browser/api/extensions.js index b11f119710..ee9dce5257 100644 --- a/lib/browser/api/extensions.js +++ b/lib/browser/api/extensions.js @@ -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])