Skip to content

Commit

Permalink
fix: use undefined instead of null for options
Browse files Browse the repository at this point in the history
  • Loading branch information
dsanders11 committed Jun 27, 2022
1 parent 1f19b0b commit 208a223
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions graceful-fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function patch (fs) {
fs.readFile = readFile
function readFile (path, options, cb) {
if (typeof options === 'function')
cb = options, options = null
cb = options, options = undefined

return go$readFile(path, options, cb)

Expand All @@ -130,7 +130,7 @@ function patch (fs) {
fs.writeFile = writeFile
function writeFile (path, data, options, cb) {
if (typeof options === 'function')
cb = options, options = null
cb = options, options = undefined

return go$writeFile(path, data, options, cb)

Expand All @@ -151,7 +151,7 @@ function patch (fs) {
fs.appendFile = appendFile
function appendFile (path, data, options, cb) {
if (typeof options === 'function')
cb = options, options = null
cb = options, options = undefined

return go$appendFile(path, data, options, cb)

Expand Down Expand Up @@ -194,7 +194,7 @@ function patch (fs) {
var noReaddirOptionVersions = /^v[0-5]\./
function readdir (path, options, cb) {
if (typeof options === 'function')
cb = options, options = null
cb = options, options = undefined

var go$readdir = noReaddirOptionVersions.test(process.version)
? function go$readdir (path, options, cb, startTime) {
Expand Down

0 comments on commit 208a223

Please sign in to comment.