Fix Javascript error that appears when there is no hash part on the URL

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2017-10-21 11:24:52 +02:00
parent ec4b43961c
commit 852f0a733a

View File

@@ -164,8 +164,11 @@ $("button[id^='adlist-btn-']").on("click", function (e) {
// Javascript to go to specified tab on save or hyperlink
$(function () {
var activeTab = $("[href=" + location.hash + "]");
activeTab && activeTab.tab("show");
if(location.hash.length > 0)
{
var activeTab = $("[href=" + location.hash + "]");
activeTab && activeTab.tab("show");
}
});
// Change hash for save and reload
$(".nav-tabs a").on("shown.bs.tab", function (e) {