mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Prevent no-op edit of node marking as changed due to icon
This commit is contained in:
		| @@ -881,7 +881,6 @@ RED.diff = (function() { | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         var properties = Object.keys(node).filter(function(p) { return p!='inputLabels'&&p!='outputLabels'&&p!='z'&&p!='wires'&&p!=='x'&&p!=='y'&&p!=='id'&&p!=='type'&&(!def.defaults||!def.defaults.hasOwnProperty(p))}); | ||||
|         if (def.defaults) { | ||||
|             properties = properties.concat(Object.keys(def.defaults)); | ||||
| @@ -889,6 +888,13 @@ RED.diff = (function() { | ||||
|         if (node.type !== 'tab') { | ||||
|             properties = properties.concat(['inputLabels','outputLabels']); | ||||
|         } | ||||
|         if ( ((localNode && localNode.hasOwnProperty('icon')) || (remoteNode && remoteNode.hasOwnProperty('icon'))) && | ||||
|             properties.indexOf('icon') === -1 | ||||
|         ) { | ||||
|             properties.unshift('icon'); | ||||
|         } | ||||
|  | ||||
|  | ||||
|         properties.forEach(function(d) { | ||||
|             localChanged = false; | ||||
|             remoteChanged = false; | ||||
|   | ||||
| @@ -1110,7 +1110,7 @@ RED.editor = (function() { | ||||
|                                     changed = true; | ||||
|                                 } | ||||
|                             } else { | ||||
|                                 if (icon !== defaultIcon) { | ||||
|                                 if (icon !== "" && icon !== defaultIcon) { | ||||
|                                     changes.icon = editing_node.icon; | ||||
|                                     editing_node.icon = icon; | ||||
|                                     changed = true; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user