diff --git a/browser/components/customizableui/content/panelUI.js b/browser/components/customizableui/content/panelUI.js index 5865b94feb1..58249f6cdfe 100644 --- a/browser/components/customizableui/content/panelUI.js +++ b/browser/components/customizableui/content/panelUI.js @@ -56,6 +56,10 @@ const PanelUI = { }, uninit: function() { + if (!this._eventListenersAdded) { + return; + } + for (let event of this.kEvents) { this.panel.removeEventListener(event, this); }