mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Handle null return from Function node in array of messages
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright 2013,2015 IBM Corp.
|
||||
* Copyright 2013, 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,12 +30,16 @@ module.exports = function(RED) {
|
||||
if (msgs[m]) {
|
||||
if (util.isArray(msgs[m])) {
|
||||
for (var n=0; n < msgs[m].length; n++) {
|
||||
msgs[m][n]._msgid = _msgid;
|
||||
msgCount++;
|
||||
if (msgs[m][n] !== null && msgs[m][n] !== undefined) {
|
||||
msgs[m][n]._msgid = _msgid;
|
||||
msgCount++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
msgs[m]._msgid = _msgid;
|
||||
msgCount++;
|
||||
if (msgs[m] !== null && msgs[m] !== undefined) {
|
||||
msgs[m]._msgid = _msgid;
|
||||
msgCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user