From 2b7f73a6313af42b048d32859a32114ebb0366b2 Mon Sep 17 00:00:00 2001 From: Christoph Burgdorf Date: Tue, 11 Feb 2014 11:45:41 +0100 Subject: [PATCH] fix(goUpControl): fix incorrect labeling logic --- dist/cc.angular.js | 4 ++-- src/directives/ccGoUpControl/ccGoUpControl.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/cc.angular.js b/dist/cc.angular.js index a7ed5f4..75dfc8a 100644 --- a/dist/cc.angular.js +++ b/dist/cc.angular.js @@ -2877,8 +2877,8 @@ angular.module('sdk.directives.ccGoUpControl') link: function($scope, element, attributes){ $scope.getParentLabel = function () { - return $scope.category.parent && $scope.category.parent.parent ? $scope.category.parent.label : - $scope.category.parent ? $scope.homeText : ''; + return $scope.category.parent && !$scope.category.parent.isRoot ? $scope.category.parent.label : + $scope.category.parent && $scope.category.parent.isRoot ? $scope.homeText : ''; }; } }; diff --git a/src/directives/ccGoUpControl/ccGoUpControl.js b/src/directives/ccGoUpControl/ccGoUpControl.js index cb625ec..87533e4 100644 --- a/src/directives/ccGoUpControl/ccGoUpControl.js +++ b/src/directives/ccGoUpControl/ccGoUpControl.js @@ -20,8 +20,8 @@ angular.module('sdk.directives.ccGoUpControl') link: function($scope, element, attributes){ $scope.getParentLabel = function () { - return $scope.category.parent && $scope.category.parent.parent ? $scope.category.parent.label : - $scope.category.parent ? $scope.homeText : ''; + return $scope.category.parent && !$scope.category.parent.isRoot ? $scope.category.parent.label : + $scope.category.parent && $scope.category.parent.isRoot ? $scope.homeText : ''; }; } };