From c9f2080e4b3784e89ec06ec8449ddb33c87dc850 Mon Sep 17 00:00:00 2001 From: Felix Rieseberg Date: Mon, 20 Nov 2017 08:20:20 -0800 Subject: [PATCH] :wrench: fs.readFile: options are optional --- lib/common/asar.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/common/asar.js b/lib/common/asar.js index d0dde2b7e744..e30199812d86 100644 --- a/lib/common/asar.js +++ b/lib/common/asar.js @@ -464,6 +464,10 @@ options = { encoding: options } + } else if (options === null || options === undefined) { + options = { + encoding: null + } } else if (!util.isObject(options)) { throw new TypeError('Bad arguments') }