diff --git a/lib/internal/fs/promises.js b/lib/internal/fs/promises.js index b5543c79928751..3afd1a84985781 100644 --- a/lib/internal/fs/promises.js +++ b/lib/internal/fs/promises.js @@ -242,15 +242,6 @@ async function write(handle, buffer, offset, length, position) { if (typeof buffer !== 'string') buffer += ''; - if (typeof position !== 'function') { - if (typeof offset === 'function') { - position = offset; - offset = null; - } else { - position = length; - } - length = 'utf8'; - } const bytesWritten = (await binding.writeString(handle.fd, buffer, offset, length, kUsePromises)) || 0; return { bytesWritten, buffer };