Skip to content

Commit

Permalink
fix(goUpControl): fix incorrect labeling logic
Browse files Browse the repository at this point in the history
  • Loading branch information
cburgdorf committed Feb 11, 2014
1 parent 1b7b120 commit 2b7f73a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/cc.angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 : '';
};
}
};
Expand Down
4 changes: 2 additions & 2 deletions src/directives/ccGoUpControl/ccGoUpControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 : '';
};
}
};
Expand Down

0 comments on commit 2b7f73a

Please sign in to comment.