diff --git a/public/script/app.js b/public/script/app.js index 7f2853a..2600bc6 100644 --- a/public/script/app.js +++ b/public/script/app.js @@ -194,11 +194,13 @@ angular $scope.opens = {}; - let accumulatedPath = ""; - $routeParams.path.split("/").forEach((f) => { - $scope.opens[accumulatedPath + "/" + f] = true; - accumulatedPath = accumulatedPath + "/" + f; - }); + if ($routeParams.path) { + let accumulatedPath = ""; + $routeParams.path.split("/").forEach((f) => { + $scope.opens[accumulatedPath + "/" + f] = true; + accumulatedPath = accumulatedPath + "/" + f; + }); + } const toArray = function (obj) { const output = [];