Skip to content

Commit 7d00321

Browse files
fracsinusronag
andauthored
Update lib/internal/fs/promises.js
Co-authored-by: Robert Nagy <[email protected]>
1 parent 4948c56 commit 7d00321

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/fs/promises.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ async function read(handle, bufferOrOptions, offset, length, position) {
520520
buffer = Buffer.alloc(16384);
521521
}
522522
offset = bufferOrOptions.offset || 0;
523-
length = bufferOrOptions.length || buffer.byteLength;
523+
length = bufferOrOptions.length ?? buffer.byteLength;
524524
position = bufferOrOptions.position ?? null;
525525
}
526526

0 commit comments

Comments
 (0)