🔧 fs.readFile: options are optional

This commit is contained in:
Felix Rieseberg 2017-11-20 08:20:20 -08:00
parent 5eb00e45aa
commit c9f2080e4b

View file

@ -464,6 +464,10 @@
options = { options = {
encoding: options encoding: options
} }
} else if (options === null || options === undefined) {
options = {
encoding: null
}
} else if (!util.isObject(options)) { } else if (!util.isObject(options)) {
throw new TypeError('Bad arguments') throw new TypeError('Bad arguments')
} }