From 87e7d8ada8e630725de831db574a727174384857 Mon Sep 17 00:00:00 2001 From: Chaim Lev-Ari Date: Tue, 18 May 2021 13:43:27 +0300 Subject: [PATCH] fix(stacks): check for editor change before setting as dirty --- app/portainer/views/stacks/edit/stackController.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/portainer/views/stacks/edit/stackController.js b/app/portainer/views/stacks/edit/stackController.js index f7e8b05d2..4e4619864 100644 --- a/app/portainer/views/stacks/edit/stackController.js +++ b/app/portainer/views/stacks/edit/stackController.js @@ -203,10 +203,9 @@ angular.module('portainer.app').controller('StackController', [ $scope.editorUpdate = function (cm) { if ($scope.stackFileContent !== cm.getValue()) { $scope.state.isEditorDirty = true; + $scope.stackFileContent = cm.getValue(); + $scope.state.yamlError = StackHelper.validateYAML($scope.stackFileContent, $scope.containerNames); } - $scope.stackFileContent = cm.getValue(); - $scope.state.yamlError = StackHelper.validateYAML($scope.stackFileContent, $scope.containerNames); - $scope.state.isEditorDirty = true; }; $scope.stopStack = stopStack;