From c186e104b47f9cdca0809bf3a60d67ad14302a7d Mon Sep 17 00:00:00 2001 From: Henry Paradiz Date: Mon, 24 Jul 2017 11:37:52 -0400 Subject: [PATCH] Changed fs event handlers to arrow functions --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index a6bad6a..90c2e3d 100644 --- a/index.js +++ b/index.js @@ -147,10 +147,10 @@ class ChartjsNode { .then(buffer => { return new BbPromise((resolve,reject) => { var out = fs.createWriteStream(filePath); - out.on('finish', function () { + out.on('finish', () => { return resolve(); }); - out.on('error', function () { + out.on('error', () => { return reject(); }); out.write(buffer);