Fixed workspaces icons appearing on private mode once opening another window

This commit is contained in:
mr. M
2025-01-01 14:23:11 +01:00
parent 0c8378e22a
commit 51bd1445a5

View File

@@ -651,6 +651,11 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
async _propagateWorkspaceData({ ignoreStrip = false, clearCache = true } = {}) {
await this.foreachWindowAsActive(async (browser) => {
// Do not update the window if workspaces are not enabled in it.
// For example, when the window is in private browsing mode.
if (!browser.ZenWorkspaces.workspaceEnabled) {
return;
}
await browser.ZenWorkspaces.updateWorkspaceIndicator();
let workspaceList = browser.document.getElementById('PanelUI-zen-workspaces-list');
const createWorkspaceElement = (workspace) => {