mirror of https://github.com/portainer/portainer
				
				
				
			fix(app/editor): set value from outside only if needed (#5445)
							parent
							
								
									bbbc61dca9
								
							
						
					
					
						commit
						dcb85ad8fe
					
				| 
						 | 
				
			
			@ -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);
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue