Fix JS NPEs

This commit is contained in:
Joseph Schorr 2015-05-04 09:17:58 -07:00
parent 7ec0ad45fc
commit 70cc895b95
4 changed files with 5 additions and 3 deletions

View file

@ -15,6 +15,7 @@ angular.module('quay').directive('sourceCommitLink', function () {
},
controller: function($scope, $element) {
$scope.getUrl = function(sha, template) {
if (!template) { return ''; }
return template.replace('{sha}', sha);
};
}

View file

@ -33,6 +33,7 @@ angular.module('quay').directive('sourceRefLink', function () {
};
$scope.getUrl = function(ref, template, kind) {
if (!template) { return ''; }
return template.replace('{' + kind + '}', $scope.getTitle(ref));
};
}