diff --git a/src/js/background/backgroundLogic.js b/src/js/background/backgroundLogic.js index 89f9159..d84b2b3 100644 --- a/src/js/background/backgroundLogic.js +++ b/src/js/background/backgroundLogic.js @@ -238,7 +238,7 @@ const backgroundLogic = { }, async sortTabs() { - const windows = await browser.windows.getAll(); + const windows = await browser.windows.getAll({ populate: true }); for (let windowObj of windows) { // eslint-disable-line prefer-const // First the pinned tabs, then the normal ones. await this._sortTabsInternal(windowObj, true); @@ -247,7 +247,7 @@ const backgroundLogic = { }, async _sortTabsInternal(windowObj, pinnedTabs) { - const tabs = await browser.tabs.query({windowId: windowObj.id}); + const tabs = windowObj.tabs; let pos = 0; // Let's collect UCIs/tabs for this window.