From b3f35c579b37bbfd7e02671a7572e26289fe2f2c Mon Sep 17 00:00:00 2001 From: Marc Hannappel Date: Wed, 21 Dec 2016 10:56:11 +0100 Subject: [PATCH] Little update to the active tab using hash from URL, forgot to add a check if the hash is valid, fixed this now --- src/octoprint/static/js/app/main.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/octoprint/static/js/app/main.js b/src/octoprint/static/js/app/main.js index d762f1e5..80b1701e 100644 --- a/src/octoprint/static/js/app/main.js +++ b/src/octoprint/static/js/app/main.js @@ -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