mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
refix copy results array
This commit is contained in:
parent
ef5b577f7f
commit
a194c56acb
@ -153,6 +153,9 @@ module.exports = function(RED) {
|
|||||||
if ((rows.constructor.name === "OkPacket") || (rows.constructor.name === "Array")) {
|
if ((rows.constructor.name === "OkPacket") || (rows.constructor.name === "Array")) {
|
||||||
msg.payload = JSON.parse(JSON.stringify(rows));
|
msg.payload = JSON.parse(JSON.stringify(rows));
|
||||||
}
|
}
|
||||||
|
else if ((rows.constructor.name === "OkPacket") || (rows.constructor.name === "Array")) {
|
||||||
|
msg.payload = rows.map(v => Object.assign({}, v));
|
||||||
|
}
|
||||||
else { msg.payload = rows; }
|
else { msg.payload = rows; }
|
||||||
node.send(msg);
|
node.send(msg);
|
||||||
status = {fill:"green",shape:"dot",text:"OK"};
|
status = {fill:"green",shape:"dot",text:"OK"};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "node-red-node-mysql",
|
"name": "node-red-node-mysql",
|
||||||
"version": "0.1.4",
|
"version": "0.1.5",
|
||||||
"description": "A Node-RED node to read and write to a MySQL database",
|
"description": "A Node-RED node to read and write to a MySQL database",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"mysql": "^2.18.1"
|
"mysql": "^2.18.1"
|
||||||
|
Loading…
Reference in New Issue
Block a user