code review for #3428

This commit is contained in:
Raymond Hill 2018-02-26 16:52:16 -05:00
parent 7f41875cca
commit 0414ce80a0
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 4 additions and 7 deletions

View File

@ -48,7 +48,9 @@ var removeAllChildren = logger.removeAllChildren = function(node) {
var tabIdFromClassName = function(className) { var tabIdFromClassName = function(className) {
var matches = className.match(/\btab_([^ ]+)\b/); var matches = className.match(/\btab_([^ ]+)\b/);
return matches !== null ? matches[1] : ''; if ( matches === null ) { return 0; }
if ( matches[1] === 'bts' ) { return -1; }
return parseInt(matches[1], 10);
}; };
var tabIdFromPageSelector = logger.tabIdFromPageSelector = function() { var tabIdFromPageSelector = logger.tabIdFromPageSelector = function() {
@ -1609,12 +1611,7 @@ var popupManager = (function() {
var toggleOn = function(td) { var toggleOn = function(td) {
var tr = td.parentNode; var tr = td.parentNode;
realTabId = localTabId = tabIdFromClassName(tr.className); realTabId = localTabId = tabIdFromClassName(tr.className);
if ( realTabId === '' ) { if ( realTabId === 0 ) { return; }
return;
}
if ( localTabId === 'bts' ) {
realTabId = -1;
}
container = uDom.nodeFromId('popupContainer'); container = uDom.nodeFromId('popupContainer');