Skip to content

Commit b83faf9

Browse files
authored
Use nullish coalescing to respect zero positional reads
1 parent 2e2a6fe commit b83faf9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/fs/promises.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ async function read(handle, bufferOrOptions, offset, length, position) {
521521
}
522522
offset = bufferOrOptions.offset || 0;
523523
length = buffer.byteLength;
524-
position = bufferOrOptions.position || null;
524+
position = bufferOrOptions.position ?? null;
525525
}
526526

527527
if (offset == null) {

0 commit comments

Comments
 (0)