From ff094e2ccf25fea5e75f67bab644943e39048cb1 Mon Sep 17 00:00:00 2001 From: Chris Berry Date: Mon, 2 Oct 2017 09:25:38 -0700 Subject: [PATCH] fix(pipelines): properly sync plan/pipeline/renderablePipeline (#4198) --- .../core/src/pipeline/config/pipelineConfigurer.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/scripts/modules/core/src/pipeline/config/pipelineConfigurer.js b/app/scripts/modules/core/src/pipeline/config/pipelineConfigurer.js index 3795ced6a50..0fde17ee59d 100644 --- a/app/scripts/modules/core/src/pipeline/config/pipelineConfigurer.js +++ b/app/scripts/modules/core/src/pipeline/config/pipelineConfigurer.js @@ -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) => {