summaryrefslogtreecommitdiff
path: root/lib/_stream_readable.js
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-08-28 10:11:17 -0700
committerisaacs <i@izs.me>2013-08-28 10:11:17 -0700
commit96358613f9cfce8ea602033334ec80f2712e3756 (patch)
treee7a65867a90b97e4c6b90bd1a9a966abd9be3621 /lib/_stream_readable.js
parent29d3624daedc9a120fa596402e34173179e4a868 (diff)
parentfbb963b5d520a70d9c3f2f9ec116d79a0c676f80 (diff)
downloadnode-96358613f9cfce8ea602033334ec80f2712e3756.tar.gz
Merge remote-tracking branch 'ry/v0.10'
Conflicts: AUTHORS ChangeLog deps/uv/ChangeLog deps/uv/include/uv-darwin.h deps/uv/src/unix/darwin.c deps/uv/src/unix/fsevents.c deps/uv/src/version.c lib/_stream_writable.js src/node_version.h
Diffstat (limited to 'lib/_stream_readable.js')
-rw-r--r--lib/_stream_readable.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js
index 95c044a18..6dadc281c 100644
--- a/lib/_stream_readable.js
+++ b/lib/_stream_readable.js
@@ -550,7 +550,7 @@ Readable.prototype.pipe = function(dest, pipeOpts) {
}
// This is a brutally ugly hack to make sure that our error handler
// is attached before any userland ones. NEVER DO THIS.
- if (!dest._events.error)
+ if (!dest._events || !dest._events.error)
dest.on('error', onerror);
else if (Array.isArray(dest._events.error))
dest._events.error.unshift(onerror);