Merge pull request #11185 from electron/fs-optional-options

fix: fs.readFile: make options optional
This commit is contained in:
Charles Kerr 2017-11-20 10:57:31 -06:00 committed by GitHub
commit fa37d49fb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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')
}