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

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

View File

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