From 363723fc84f7b8477592e0105aeb331ec9a017af Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 14 Aug 2017 05:01:11 +0200 Subject: node_modules --- node_modules/jsonfile/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'node_modules/jsonfile/index.js') diff --git a/node_modules/jsonfile/index.js b/node_modules/jsonfile/index.js index 5ac06cfff..a28684f60 100644 --- a/node_modules/jsonfile/index.js +++ b/node_modules/jsonfile/index.js @@ -94,7 +94,9 @@ function writeFile (file, obj, options, callback) { try { str = JSON.stringify(obj, options ? options.replacer : null, spaces) + '\n' } catch (err) { - if (callback) return callback(err, null) + // Need to return whether a callback was passed or not + if (callback) callback(err, null) + return } fs.writeFile(file, str, options, callback) -- cgit v1.2.3