mirror of
https://github.com/portainer/portainer.git
synced 2025-08-06 06:15:22 +02:00
fix(app/editor): set value from outside only if needed (#5445)
This commit is contained in:
parent
bbbc61dca9
commit
dcb85ad8fe
1 changed files with 1 additions and 1 deletions
|
@ -2,7 +2,7 @@ angular.module('portainer.app').controller('CodeEditorController', function Code
|
||||||
var ctrl = this;
|
var ctrl = this;
|
||||||
|
|
||||||
this.$onChanges = function $onChanges({ value }) {
|
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);
|
ctrl.editor.setValue(value.currentValue);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue