fix(stacks): remove line breaks in web editors value

pull/5079/head
Felix Han 2021-05-19 12:09:11 +12:00
parent 87e7d8ada8
commit e54d99fd3d
1 changed files with 1 additions and 1 deletions

View File

@ -201,7 +201,7 @@ angular.module('portainer.app').controller('StackController', [
};
$scope.editorUpdate = function (cm) {
if ($scope.stackFileContent !== cm.getValue()) {
if ($scope.stackFileContent.replace(/(\r\n|\n|\r)/gm, '') !== cm.getValue().replace(/(\r\n|\n|\r)/gm, '')) {
$scope.state.isEditorDirty = true;
$scope.stackFileContent = cm.getValue();
$scope.state.yamlError = StackHelper.validateYAML($scope.stackFileContent, $scope.containerNames);