Using the ‘a msg per line’ the last line does not get msg.topic passed (#2352)

When using the file-in node and ‘a msg per line’ the last line does not get msg.topic passed. 

In the  
   .on(‘end’, function() { 
code (starting at line 334) the msg is created but no msg.topic is set. Adding 
   topic:msg.topic, 
after line 343 (var m = { payload: spare,) fixes the issue.
This commit is contained in:
juggledad 2019-10-25 09:51:50 -04:00 committed by Dave Conway-Jones
parent 6026da867b
commit 22b9df62d1
1 changed files with 1 additions and 0 deletions

View File

@ -341,6 +341,7 @@ module.exports = function(RED) {
}
else if (node.format === "lines") {
var m = { payload: spare,
topic:msg.topic,
parts: {
index: count,
count: count+1,