update "fstream" to v0.1.22

This commit is contained in:
Nathan Rajlich 2013-03-21 09:14:49 -10:00
parent 69da815c6f
commit bdacb6a5b8
5 changed files with 26 additions and 22 deletions

View file

@ -71,7 +71,7 @@ ProxyWriter.prototype._addProxy = function (proxy) {
var calls = me._buffer
calls.forEach(function (c) {
// console.error("~~ ~~ proxy buffered call", c[0], c[1])
proxy[c[0]].call(proxy, c[1])
proxy[c[0]].apply(proxy, c[1])
})
me._buffer.length = 0
if (me._needsDrain) me.emit("drain")
@ -102,7 +102,7 @@ ProxyWriter.prototype.write = function (c) {
ProxyWriter.prototype.end = function (c) {
// console.error("~~ proxy end")
if (!this._proxy) {
this._buffer.push(["end", c])
this._buffer.push(["end", [c]])
return false
}
return this._proxy.end(c)