Automatically call toString() when writing data to output stream (used to fix errors that might happen if you do something like context.w(3))

This commit is contained in:
Phil Gates-Idem 2014-08-10 18:52:33 -04:00
parent 03300e8031
commit bb5314e633

View File

@ -114,7 +114,9 @@ if (stream) {
Readable.prototype = {
write: function(data) {
this.push(data);
if (data != null) {
this.push(data.toString());
}
},
end: function() {
this.push(null);