Fixed issue where a tab on the client page can be blank on page load

This commit is contained in:
Hillel Coren 2016-01-10 20:25:15 +02:00
parent 5fbe59fa8b
commit 9436f5a51e

View File

@ -327,9 +327,10 @@
} }
} }
}); });
var tab = localStorage.getItem('client_tab'); var tab = localStorage.getItem('client_tab') || '';
if (tab && tab != 'activity') { var selector = '.nav-tabs a[href="#' + tab.replace('#', '') + '"]';
$('.nav-tabs a[href="#' + tab.replace('#', '') + '"]').tab('show'); if (tab && tab != 'activity' && $(selector).length) {
$(selector).tab('show');
} else { } else {
window['load_activity'](); window['load_activity']();
} }