From 0d133b0fa4d7a9a7a3a9093dbe9c467695edb59a Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 25 Jun 2015 13:03:08 -0400 Subject: [PATCH] appLinkTarget needs to be lazy --- static/directives/new-header-bar.html | 20 ++++++++++---------- static/js/directives/ui/header-bar.js | 11 ++++++++--- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/static/directives/new-header-bar.html b/static/directives/new-header-bar.html index f59baca39..37bc74e4b 100644 --- a/static/directives/new-header-bar.html +++ b/static/directives/new-header-bar.html @@ -5,7 +5,7 @@ - + @@ -19,29 +19,29 @@ diff --git a/static/js/directives/ui/header-bar.js b/static/js/directives/ui/header-bar.js index e5da1073b..98692ffed 100644 --- a/static/js/directives/ui/header-bar.js +++ b/static/js/directives/ui/header-bar.js @@ -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() {