Skip to content

Commit

Permalink
Merge pull request #2403 from benjaminapetersen/issue/1942/navigate-f…
Browse files Browse the repository at this point in the history
…ilter-error

Automatic merge from submit-queue.

Low risk fix for issue 1942: keep build breadcrumbs from throwing error

Partial fix for issue #1942.  See the issue for details.

Per conversation on irc.
@jwforres @spadgett
  • Loading branch information
openshift-merge-robot committed Oct 31, 2017
2 parents 2e5d697 + 779ef29 commit 9b48a7b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion app/scripts/controllers/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ angular.module('openshiftConsole')

var buildNumber = annotation(build, "buildNumber");
if (buildNumber) {
$scope.breadcrumbs[2].title = "#" + buildNumber;
// tmp fix for issue #1942
if($scope.breadcrumbs[2]) {
$scope.breadcrumbs[2].title = "#" + buildNumber;
}
}
if (action === "DELETED") {
$scope.alerts["deleted"] = {
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -5529,7 +5529,7 @@ e.eventObjects = l ? [ e.build, l ] : [ e.build ];
}, f = function(t, n) {
e.loaded = !0, e.build = t, m(t), c();
var a = u(t, "buildNumber");
a && (e.breadcrumbs[2].title = "#" + a), "DELETED" === n && (e.alerts.deleted = {
a && e.breadcrumbs[2] && (e.breadcrumbs[2].title = "#" + a), "DELETED" === n && (e.alerts.deleted = {
type: "warning",
message: "This build has been deleted."
});
Expand Down

0 comments on commit 9b48a7b

Please sign in to comment.