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

Fix JSONata in file-in node

This commit is contained in:
Kazuhito Yokoi 2023-07-14 00:24:50 +09:00
parent 80e33489d9
commit f3847a17f3

View File

@ -314,9 +314,12 @@ module.exports = function(RED) {
node.error(err,msg); node.error(err,msg);
return done(); return done();
} else { } else {
filename = (value || "").replace(/\t|\r|\n/g,''); processMsg2(msg, nodeSend, (value || "").replace(/\t|\r|\n/g,''), nodeDone);
} }
}); });
});
function processMsg2(msg, nodeSend, filename, nodeDone) {
filename = filename || ""; filename = filename || "";
var fullFilename = filename; var fullFilename = filename;
if (filename && RED.settings.fileWorkingDirectory && !path.isAbsolute(filename)) { if (filename && RED.settings.fileWorkingDirectory && !path.isAbsolute(filename)) {
@ -437,7 +440,8 @@ module.exports = function(RED) {
nodeDone(); nodeDone();
}); });
} }
}); }
this.on('close', function() { this.on('close', function() {
node.status({}); node.status({});
}); });