diff --git a/lib/internal/fs/promises.js b/lib/internal/fs/promises.js index 6b523473e4bdf3..eee08d1409f040 100644 --- a/lib/internal/fs/promises.js +++ b/lib/internal/fs/promises.js @@ -244,15 +244,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 };