From 1ef10e7087680721b6b906d60648d930e1b5a1a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Nison?= Date: Sun, 30 Sep 2018 20:06:24 +0100 Subject: [PATCH] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 5ca9cec..17185d9 100644 --- a/index.js +++ b/index.js @@ -56,7 +56,7 @@ module.exports = function (file, opts) { var stream = through(write, end); stream.push('process.nextTick(function(){(' + cb + ')(null,'); - if (isBuffer) stream.push('Buffer('); + if (isBuffer) stream.push('Buffer.from('); var s = fs.createReadStream(file, { encoding: enc }); s.on('error', function (err) { sm.emit('error', err) });