diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 01331f058ec..13872273e06 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -5374,6 +5374,7 @@ function setToolbarVisibility(toolbar, isVisible) { var TabsOnTop = { init: function TabsOnTop_init() { + this._initialized = true; this.syncUI(); Services.prefs.addObserver(this._prefName, this, false); }, @@ -5387,6 +5388,9 @@ var TabsOnTop = { }, syncUI: function () { + if (!this._initialized) + return; + let userEnabled = Services.prefs.getBoolPref(this._prefName); let enabled = userEnabled && gBrowser.tabContainer.visible;