update core nodes to use newer Buffer syntax

This commit is contained in:
Dave Conway-Jones
2017-06-24 13:53:45 +01:00
parent 395210e4f0
commit a824caf712
4 changed files with 21 additions and 21 deletions

View File

@@ -55,7 +55,7 @@ module.exports = function(RED) {
if (typeof data === "boolean") { data = data.toString(); }
if (typeof data === "number") { data = data.toString(); }
if ((this.appendNewline) && (!Buffer.isBuffer(data))) { data += os.EOL; }
node.data.push(new Buffer(data));
node.data.push(new Buffer.from(data));
while (node.data.length > 0) {
if (this.overwriteFile === "true") {