mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 04:50:00 +02:00
Refactor _expandWorkspacesStrip function to handle undefined browser parameter
This commit is contained in:
parent
3fbe081350
commit
c86b344c17
1 changed files with 4 additions and 1 deletions
|
@ -406,7 +406,10 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||||
await this._expandWorkspacesStrip();
|
await this._expandWorkspacesStrip();
|
||||||
}
|
}
|
||||||
|
|
||||||
async _expandWorkspacesStrip(browser = window) {
|
async _expandWorkspacesStrip(browser = undefined) {
|
||||||
|
if (typeof browser === 'undefined' || typeof browser.ZenWorkspaces === 'undefined') {
|
||||||
|
browser = window;
|
||||||
|
}
|
||||||
let workspaces = await browser.ZenWorkspaces._workspaces();
|
let workspaces = await browser.ZenWorkspaces._workspaces();
|
||||||
let workspaceList = browser.document.getElementById('zen-workspaces-button');
|
let workspaceList = browser.document.getElementById('zen-workspaces-button');
|
||||||
const newWorkspacesButton = browser.document.createXULElement('toolbarbutton');
|
const newWorkspacesButton = browser.document.createXULElement('toolbarbutton');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue