From b5ec7758338a29f1a4f92a91cd92bd0df6dc5b55 Mon Sep 17 00:00:00 2001 From: Robert Date: Thu, 3 May 2018 10:35:23 +0200 Subject: [PATCH] Removed duplicate code and fixed bug where dropdown would not go away when there were no document types that allowed variations --- .../src/controllers/navigation.controller.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js b/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js index 07fd546a25..926489ac2a 100644 --- a/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js +++ b/src/Umbraco.Web.UI.Client/src/controllers/navigation.controller.js @@ -210,7 +210,11 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar if (b === "true") { //load languages if there are more than 1 loadLanguages(); + } else { + $scope.languages = []; + init(); } + }); } })); @@ -249,7 +253,6 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar function loadLanguages() { languageResource.getAll().then(function (languages) { $scope.languages = languages; - $scope.languages = languages; if ($scope.languages.length > 1) { var defaultLang = _.find($scope.languages, function (l) {