Bug 1923326 - fix toolbarbutton access on startup when sidebar button isn't in the DOM yet, r=sidebar-reviewers,jsudiaman,nsharpley

Differential Revision: https://phabricator.services.mozilla.com/D224930
This commit is contained in:
Gijs Kruitbosch
2024-10-08 13:43:41 +00:00
parent 29cb81fbbd
commit e68340d490

View File

@@ -1003,7 +1003,7 @@ var SidebarController = {
// For the non-revamped sidebar, this is handled by CustomizableWidgets.
return;
}
this.toolbarButton.toggleAttribute("expanded", this.sidebarMain.expanded);
toolbarButton.toggleAttribute("expanded", this.sidebarMain.expanded);
switch (this.sidebarRevampVisibility) {
case "always-show":
// Toolbar button controls expanded state.