mirror of https://github.com/node-red/node-red.git
Merge pull request #5278 from GogoVega/fix-5275
Fix undo node output changes inside a Subflowpull/5294/head
commit
11feee3294
|
|
@ -582,22 +582,23 @@ RED.history = (function() {
|
|||
RED.editor.updateNodeProperties(n);
|
||||
RED.editor.validateNode(n);
|
||||
});
|
||||
} else {
|
||||
var outputMap;
|
||||
if (ev.outputMap) {
|
||||
outputMap = {};
|
||||
inverseEv.outputMap = {};
|
||||
for (var port in ev.outputMap) {
|
||||
if (ev.outputMap.hasOwnProperty(port) && ev.outputMap[port] !== "-1") {
|
||||
outputMap[ev.outputMap[port]] = port;
|
||||
inverseEv.outputMap[ev.outputMap[port]] = port;
|
||||
}
|
||||
}
|
||||
|
||||
let outputMap;
|
||||
if (ev.outputMap) {
|
||||
outputMap = {};
|
||||
inverseEv.outputMap = {};
|
||||
for (var port in ev.outputMap) {
|
||||
if (ev.outputMap.hasOwnProperty(port) && ev.outputMap[port] !== "-1") {
|
||||
outputMap[ev.outputMap[port]] = port;
|
||||
inverseEv.outputMap[ev.outputMap[port]] = port;
|
||||
}
|
||||
}
|
||||
ev.node.__outputs = inverseEv.changes.outputs;
|
||||
RED.editor.updateNodeProperties(ev.node,outputMap);
|
||||
RED.editor.validateNode(ev.node);
|
||||
}
|
||||
ev.node.__outputs = inverseEv.changes.outputs;
|
||||
RED.editor.updateNodeProperties(ev.node,outputMap);
|
||||
RED.editor.validateNode(ev.node);
|
||||
|
||||
// If it's a Config Node, validate user nodes too.
|
||||
// NOTE: The Config Node must be validated before validating users.
|
||||
if (ev.node.users) {
|
||||
|
|
|
|||
|
|
@ -1179,7 +1179,7 @@ RED.editor = (function() {
|
|||
if (editState.outputMap) {
|
||||
historyEvent.outputMap = editState.outputMap;
|
||||
}
|
||||
if (subflowInstances) {
|
||||
if (subflowInstances && subflowInstances.length) {
|
||||
historyEvent.subflow = {
|
||||
instances:subflowInstances
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue