code review

This commit is contained in:
gorhill 2015-06-15 15:57:12 -04:00
parent 13a5495f28
commit f29f0a0f09
1 changed files with 1 additions and 7 deletions

View File

@ -2085,13 +2085,7 @@ vAPI.toolbarButton.updateState = function(win, tabId) {
var icon = this.tabs[tabId]; var icon = this.tabs[tabId];
button.setAttribute('badge', icon && icon.badge || ''); button.setAttribute('badge', icon && icon.badge || '');
button.classList.toggle('off', !icon || !icon.img);
if ( !icon || !icon.img ) {
button.classList.add('off');
}
else {
button.classList.remove('off');
}
}; };
/******************************************************************************/ /******************************************************************************/