Skip to content

Commit

Permalink
fix(core): Seatbelt optionalStage directive to make sure stage exists (
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Reynolds authored and anotherchrisberry committed Sep 21, 2017
1 parent c9bdcb9 commit 472aae4
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = angular.module('spinnaker.core.pipeline.stage.optionalStage.dir
};
}).controller('OptionalStageCtrl', function($scope) {
this.isOptional = function() {
return $scope.stage.stageEnabled;
return $scope.stage && $scope.stage.stageEnabled;
};

this.toggleOptional = function() {
Expand All @@ -29,4 +29,3 @@ module.exports = angular.module('spinnaker.core.pipeline.stage.optionalStage.dir
}
};
});

0 comments on commit 472aae4

Please sign in to comment.