mirror of
https://github.com/zen-browser/desktop.git
synced 2026-08-13 10:14:28 +00:00
fix: Default assign an array instead of an object to the workspaces cache, b=no-bug, c=workspaces
This commit is contained in:
@@ -784,7 +784,7 @@ class nsZenWindowSync {
|
||||
);
|
||||
const selectedTab = aWindow.gBrowser.selectedTab;
|
||||
let win = [...this.#browserWindows][0];
|
||||
const moveAllTabsToWindow = (allowSelected = false) => {
|
||||
const moveAllTabsToWindow = async (allowSelected = false) => {
|
||||
const { gBrowser, gZenWorkspaces } = win;
|
||||
win.focus();
|
||||
let success = true;
|
||||
@@ -804,7 +804,8 @@ class nsZenWindowSync {
|
||||
}
|
||||
if (success) {
|
||||
aWindow.close();
|
||||
win.gBrowser.selectedTab.linkedBrowser.focus();
|
||||
await gZenWorkspaces.changeWorkspaceWithID(aWorkspaceId);
|
||||
gBrowser.selectedBrowser.focus();
|
||||
}
|
||||
};
|
||||
if (!win) {
|
||||
|
||||
@@ -23,7 +23,7 @@ class nsZenWorkspaces {
|
||||
direction: null,
|
||||
};
|
||||
|
||||
_workspaceCache = {};
|
||||
_workspaceCache = [];
|
||||
|
||||
#lastScrollTime = 0;
|
||||
|
||||
@@ -806,7 +806,7 @@ class nsZenWorkspaces {
|
||||
|
||||
getWorkspaceFromId(id) {
|
||||
try {
|
||||
return this._workspaceCache.find((workspace) => workspace.uuid === id);
|
||||
return this.getWorkspaces().find((workspace) => workspace.uuid === id);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user