Little update to the active tab using hash from URL, forgot to add a check if the hash is valid, fixed this now

This commit is contained in:
Marc Hannappel 2016-12-21 10:56:11 +01:00
parent bcb74d01b6
commit b3f35c579b

View file

@ -481,10 +481,12 @@ $(function() {
var changeTab = function()
{
var hashtag = window.location.hash;
var tab = $('#tabs a[href="' + hashtag + '"]');
tab.tab("show");
onTabChange(hashtag);
if (tab.length)
{
tab.tab("show");
onTabChange(hashtag);
}
}
//~~ view model binding