diff --git a/lib/fs.js b/lib/fs.js index 69198c7811d3ed..912ca0503d5a25 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -897,7 +897,7 @@ function writeSync(fd, buffer, offsetOrOptions, length, position) { ({ offset = 0, length = buffer.byteLength - offset, - position = null + position = null, } = offsetOrOptions ?? ObjectCreate(null)); } if (position === undefined) diff --git a/lib/internal/fs/promises.js b/lib/internal/fs/promises.js index dfd16667f73877..c3c5874453a8b6 100644 --- a/lib/internal/fs/promises.js +++ b/lib/internal/fs/promises.js @@ -516,7 +516,7 @@ async function read(handle, bufferOrParams, offset, length, position) { buffer = Buffer.alloc(16384), offset = 0, length = buffer.byteLength - offset, - position = null + position = null, } = bufferOrParams ?? ObjectCreate(null)); validateBuffer(buffer); @@ -527,7 +527,7 @@ async function read(handle, bufferOrParams, offset, length, position) { ({ offset = 0, length = buffer.byteLength - offset, - position = null + position = null, } = offset); } @@ -579,7 +579,7 @@ async function write(handle, buffer, offsetOrOptions, length, position) { ({ offset = 0, length = buffer.byteLength - offset, - position = null + position = null, } = offsetOrOptions ?? ObjectCreate(null)); }