diff --git a/lib/fs.js b/lib/fs.js index ceb0e189678..89883db955c 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -890,7 +890,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 7b79536be3f..346771c506c 100644 --- a/lib/internal/fs/promises.js +++ b/lib/internal/fs/promises.js @@ -464,7 +464,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); @@ -475,7 +475,7 @@ async function read(handle, bufferOrParams, offset, length, position) { ({ offset = 0, length = buffer.byteLength - offset, - position = null + position = null, } = offset ?? ObjectCreate(null)); } @@ -527,7 +527,7 @@ async function write(handle, buffer, offsetOrOptions, length, position) { ({ offset = 0, length = buffer.byteLength - offset, - position = null + position = null, } = offsetOrOptions ?? ObjectCreate(null)); }