Skip to content

Commit

Permalink
fixup! fs: add support for async iterators to fsPromises.writeFile
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Sep 1, 2021
1 parent e462f12 commit fcbf21e
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 @@ -418,7 +418,7 @@ async function readv(handle, buffers, position) {
}

async function write(handle, buffer, offset, length, position) {
if (buffer?.length === 0)
if (buffer && buffer.length === 0)
return { bytesWritten: 0, buffer };

if (isArrayBufferView(buffer)) {
Expand Down

0 comments on commit fcbf21e

Please sign in to comment.