diff options
Diffstat (limited to 'themes/luci-theme-material/htdocs/luci-static/material/js/script.js')
-rwxr-xr-x | themes/luci-theme-material/htdocs/luci-static/material/js/script.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/themes/luci-theme-material/htdocs/luci-static/material/js/script.js b/themes/luci-theme-material/htdocs/luci-static/material/js/script.js index b6e0db4740..c7d60b9e34 100755 --- a/themes/luci-theme-material/htdocs/luci-static/material/js/script.js +++ b/themes/luci-theme-material/htdocs/luci-static/material/js/script.js @@ -260,14 +260,16 @@ */ if (!getCurrentNodeByUrl()){ getCurrentNodeByHash(); - if (tree[0] == "Status" && tree[1] == "Overview"){ + if (tree != undefined && tree[0] == "Status" && tree[1] == "Overview"){ //overview lastNode.addClass("active"); $($(".main > .main-left > .nav > .slide > .menu")[0]).click(); } } - var mainNodeName = "node-"+ tree[0] + "-" + tree[1]; - $("body").addClass(mainNodeName.replace(/[ \t\n\r\/]+/g,"_").toLowerCase()); + if (tree != undefined){ + var mainNodeName = "node-"+ tree[0] + "-" + tree[1]; + $("body").addClass(mainNodeName.replace(/[ \t\n\r\/]+/g,"_").toLowerCase()); + } $(".cbi-button-up").val(""); $(".cbi-button-down").val(""); |