mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
clone msg more correctly for CSV node multiple line output
This commit is contained in:
parent
339e6039e1
commit
51421ce657
@ -124,8 +124,9 @@ module.exports = function(RED) {
|
||||
}
|
||||
if (JSON.stringify(o) !== "{}") { // don't send empty objects
|
||||
if (node.multi === "one") {
|
||||
msg.payload = o;
|
||||
node.send(msg); // either send
|
||||
var newMessage = RED.util.cloneMessage(msg);
|
||||
newMessage.payload = o;
|
||||
node.send(newMessage); // either send
|
||||
}
|
||||
else { a.push(o); } // or add to the array
|
||||
}
|
||||
@ -148,8 +149,9 @@ module.exports = function(RED) {
|
||||
}
|
||||
if (JSON.stringify(o) !== "{}") { // don't send empty objects
|
||||
if (node.multi === "one") {
|
||||
msg.payload = o;
|
||||
node.send(msg); // either send
|
||||
var newMessage = RED.util.cloneMessage(msg);
|
||||
newMessage.payload = o;
|
||||
node.send(newMessage); // either send
|
||||
}
|
||||
else { a.push(o); } // or add to the aray
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user