Be sure we query for the current window

Related issue:
- https://github.com/uBlockOrigin/uBOL-issues/issues/14#issuecomment-1327181436
This commit is contained in:
Raymond Hill 2022-11-25 09:22:45 -05:00
parent 92397baa39
commit 96fdae726a
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 4 additions and 1 deletions

View File

@ -260,7 +260,10 @@ dom.on('#lessButton', 'click', ( ) => {
/******************************************************************************/ /******************************************************************************/
async function init() { async function init() {
const [ tab ] = await browser.tabs.query({ active: true }); const [ tab ] = await browser.tabs.query({
active: true,
windowId: browser.windows.WINDOW_ID_CURRENT,
});
if ( tab instanceof Object === false ) { return true; } if ( tab instanceof Object === false ) { return true; }
Object.assign(currentTab, tab); Object.assign(currentTab, tab);