mirror of
https://github.com/electron/electron.git
synced 2026-01-26 15:58:07 -05:00
🔧 fs.readFile: options are optional
This commit is contained in:
@@ -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')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user