fix: handle undefined ZenWorkspaces in tab selection

This commit is contained in:
Slowlife01
2025-03-31 14:06:27 +07:00
parent baf2bc9527
commit b5abda5054

View File

@@ -1,5 +1,5 @@
diff --git a/toolkit/content/widgets/tabbox.js b/toolkit/content/widgets/tabbox.js diff --git a/toolkit/content/widgets/tabbox.js b/toolkit/content/widgets/tabbox.js
index 717f0583f224be2d09a7966ee5627ebab83cc07f..af809ad8f189a11c1ab9383033483db5dcd7cf96 100644 index 717f0583f224be2d09a7966ee5627ebab83cc07f..ec251b99562f2a9b6dcfecc4588e44bbff315612 100644
--- a/toolkit/content/widgets/tabbox.js --- a/toolkit/content/widgets/tabbox.js
+++ b/toolkit/content/widgets/tabbox.js +++ b/toolkit/content/widgets/tabbox.js
@@ -213,7 +213,7 @@ @@ -213,7 +213,7 @@
@@ -16,7 +16,7 @@ index 717f0583f224be2d09a7966ee5627ebab83cc07f..af809ad8f189a11c1ab9383033483db5
return; return;
} }
- for (let otherTab of this.allTabs) { - for (let otherTab of this.allTabs) {
+ for (let otherTab of ZenWorkspaces.allStoredTabs) { + for (let otherTab of window.ZenWorkspaces?.allStoredTabs ?? this.allTabs) {
if (otherTab != tab && otherTab.selected) { if (otherTab != tab && otherTab.selected) {
otherTab._selected = false; otherTab._selected = false;
} }