mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
ping - clone msg in order to fix handling arrays of multiple requests.
This commit is contained in:
@@ -235,12 +235,12 @@ module.exports = function(RED) {
|
||||
let pingables = generatePingList(payload)
|
||||
for (let index = 0; index < pingables.length; index++) {
|
||||
const element = pingables[index];
|
||||
if (element) { doPing(node, element, msg, false); }
|
||||
if (element) { doPing(node, element, RED.util.cloneMessage(msg), false); }
|
||||
}
|
||||
} else if (Array.isArray(payload) ) {
|
||||
for (let index = 0; index < payload.length; index++) {
|
||||
const element = payload[index];
|
||||
if (element) { doPing(node, element, msg, true); }
|
||||
if (element) { doPing(node, element, RED.util.cloneMessage(msg), true); }
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user