From dcb85ad8fed4baf5f4f8e2992311c96089f2d775 Mon Sep 17 00:00:00 2001 From: Chaim Lev-Ari Date: Sun, 22 Aug 2021 12:25:31 +0300 Subject: [PATCH] fix(app/editor): set value from outside only if needed (#5445) --- app/portainer/components/code-editor/codeEditorController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/portainer/components/code-editor/codeEditorController.js b/app/portainer/components/code-editor/codeEditorController.js index 26363c108..2c7499b03 100644 --- a/app/portainer/components/code-editor/codeEditorController.js +++ b/app/portainer/components/code-editor/codeEditorController.js @@ -2,7 +2,7 @@ angular.module('portainer.app').controller('CodeEditorController', function Code var ctrl = this; this.$onChanges = function $onChanges({ value }) { - if (value && value.currentValue && ctrl.editor) { + if (value && value.currentValue && ctrl.editor && ctrl.editor.getValue() !== value.currentValue) { ctrl.editor.setValue(value.currentValue); } };