Refactor ZenWorkspaces.mjs to return an array with contextId and a boolean flag

This commit is contained in:
mauro-balades 2024-09-11 23:44:44 +02:00
parent b372ec2694
commit c9c5c94e8d

View file

@ -688,10 +688,10 @@ var ZenWorkspaces = {
// Tab browser utilities
getContextIdIfNeeded(userContextId) {
if (typeof userContextId !== "undefined" || !this.workspaceEnabled) {
return userContextId;
return [userContextId, false];
}
const activeWorkspace = this.getActiveWorkspaceFromCache();
return activeWorkspace?.containerTabId;
return [activeWorkspace?.containerTabId, true];
},
};