mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Allow File out node to handle objects more usefully.
This commit is contained in:
parent
be5f6762f7
commit
7290512794
@ -29,8 +29,10 @@ function FileNode(n) {
|
||||
|
||||
if (filename == "") {
|
||||
node.warn('No filename specified');
|
||||
} else {
|
||||
} else if (typeof msg.payload != "undefined") {
|
||||
var data = msg.payload;
|
||||
if (typeof data == "object") { data = JSON.stringify(data); }
|
||||
if (typeof data == "boolean") { data = data.toString(); }
|
||||
if (this.appendNewline) {
|
||||
data += "\n";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user