diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index 5e8924e72..4fc856afa 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -1891,11 +1891,11 @@ vAPI.toolbarButton.init = function() { for ( var win of vAPI.tabs.getWindows() ) { var button = win.document.getElementById(wId); - if ( buttonInPanel ) { - button.classList.remove('badged-button'); + if ( button === null ) { continue; } - if ( button === null ) { + if ( buttonInPanel ) { + button.classList.remove('badged-button'); continue; } button.classList.add('badged-button');