Skip to content

Commit

Permalink
fix suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
pulkit-30 committed Dec 7, 2023
1 parent 35ee64e commit 1de21b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/fs/promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ async function read(handle, bufferOrParams, offset, length, position) {
validateInteger(offset, 'offset', 0);
}

length = length ?? buffer.byteLength - offset;
length ??= buffer.byteLength - offset;

if (length === 0)
return { __proto__: null, bytesRead: length, buffer };
Expand Down

0 comments on commit 1de21b8

Please sign in to comment.