appLinkTarget needs to be lazy

This commit is contained in:
Joseph Schorr 2015-06-25 13:03:08 -04:00
parent dde8d32984
commit 0d133b0fa4
2 changed files with 18 additions and 13 deletions

View file

@ -110,10 +110,15 @@ angular.module('quay').directive('headerBar', function () {
};
$scope.appLinkTarget = function() {
if ($("div[ng-view]").length === 0) {
return "_self";
if ($scope._appLinkTarget) {
return $scope._appLinkTarget;
}
return "";
if ($("div[ng-view]").length === 0) {
return $scope._appLinkTarget = "_self";
}
return $scope._appLinkTarget = "";
};
$scope.getEnterpriseLogo = function() {