Skip to content

Commit

Permalink
fix(pipelines): properly sync plan/pipeline/renderablePipeline (#4198)
Browse files Browse the repository at this point in the history
  • Loading branch information
anotherchrisberry authored Oct 2, 2017
1 parent 2566948 commit ff094e2
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,15 @@ module.exports = angular.module('spinnaker.core.pipeline.config.pipelineConfigur

// Poor react setState
this.updatePipeline = () => {
$scope.$applyAsync(() => $scope.renderablePipeline = _.clone($scope.renderablePipeline));
$scope.$applyAsync(() => {
$scope.renderablePipeline = _.clone($scope.renderablePipeline);
// need to ensure references are maintained
if ($scope.plan) {
$scope.plan = $scope.renderablePipeline;
} else {
$scope.pipeline = $scope.renderablePipeline;
}
});
};

this.navigateToStage = (index, event) => {
Expand Down

0 comments on commit ff094e2

Please sign in to comment.