mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
streams2: Convert strings to buffers before passing to _write()
This commit is contained in:
parent
420e07c577
commit
639fbe28d1
@ -65,7 +65,7 @@ Writable.prototype.write = function(chunk, encoding) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof chunk === 'string' && encoding)
|
||||
if (typeof chunk === 'string')
|
||||
chunk = new Buffer(chunk, encoding);
|
||||
|
||||
var ret = state.length >= state.highWaterMark;
|
||||
|
Loading…
Reference in New Issue
Block a user