mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
split node - in object mode allow msg.complete on its own
This commit is contained in:
parent
82d9a02d92
commit
c9e05cf9f6
@ -309,6 +309,7 @@ module.exports = function(RED) {
|
|||||||
node.warn("Message missing msg.parts property - cannot join in 'auto' mode")
|
node.warn("Message missing msg.parts property - cannot join in 'auto' mode")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node.propertyType == "full") {
|
if (node.propertyType == "full") {
|
||||||
property = msg;
|
property = msg;
|
||||||
}
|
}
|
||||||
@ -351,11 +352,18 @@ module.exports = function(RED) {
|
|||||||
propertyKey = RED.util.getMessageProperty(msg,node.key);
|
propertyKey = RED.util.getMessageProperty(msg,node.key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((payloadType === 'object') && (propertyKey === null || propertyKey === undefined || propertyKey === "")) {
|
if ((payloadType === 'object') && (propertyKey === null || propertyKey === undefined || propertyKey === "")) {
|
||||||
if (node.mode === "auto") {
|
if (node.mode === "auto") {
|
||||||
node.warn("Message missing 'msg.parts.key' property - cannot add to object");
|
node.warn("Message missing 'msg.parts.key' property - cannot add to object");
|
||||||
} else {
|
}
|
||||||
node.warn("Message missing key property 'msg."+node.key+"' - cannot add to object")
|
else {
|
||||||
|
if (msg.hasOwnProperty('complete')) {
|
||||||
|
completeSend(partId);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
node.warn("Message missing key property 'msg."+node.key+"' - cannot add to object")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user