1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 08:19:40 +02:00

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

This commit is contained in:
Felix Han 2021-05-19 12:09:11 +12:00
parent 87e7d8ada8
commit e54d99fd3d

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);