Skip to content

Commit

Permalink
Update lib/internal/fs/promises.js
Browse files Browse the repository at this point in the history
Co-authored-by: Robert Nagy <ronagy@icloud.com>
  • Loading branch information
fracsinus and ronag committed Nov 22, 2021
1 parent 4948c56 commit 7d00321
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/fs/promises.js
Expand Up @@ -520,7 +520,7 @@ async function read(handle, bufferOrOptions, offset, length, position) {
buffer = Buffer.alloc(16384);
}
offset = bufferOrOptions.offset || 0;
length = bufferOrOptions.length || buffer.byteLength;
length = bufferOrOptions.length ?? buffer.byteLength;
position = bufferOrOptions.position ?? null;
}

Expand Down

0 comments on commit 7d00321

Please sign in to comment.