1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

msgid added in vm to avoid unneccesary if statement

This commit is contained in:
cinhcet 2020-07-08 19:09:07 +02:00
parent 5d7a625883
commit 0601833387

View File

@ -25,7 +25,6 @@ module.exports = function(RED) {
} else if (!util.isArray(msgs)) {
msgs = [msgs];
}
if(_msgid === "") _msgid = RED.util.generateId();
var msgCount = 0;
for (var m=0; m<msgs.length; m++) {
if (msgs[m]) {
@ -281,7 +280,7 @@ module.exports = function(RED) {
trace:__node__.trace,
status:__node__.status,
send: function(msgs, cloneMsg) {
__node__.send(__send__, "", msgs, cloneMsg);
__node__.send(__send__, RED.util.generateId(), msgs, cloneMsg);
}
};
`+ node.ini +`