summaryrefslogtreecommitdiff
path: root/lib/_stream_passthrough.js
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-10-08 14:43:17 -0700
committerisaacs <i@izs.me>2012-12-13 17:00:26 -0800
commit545f5126190acacd14ce54799d1e3c5d6dcd9edb (patch)
tree5db5731af7fb0f33fec79776ee286ac977f1ba5d /lib/_stream_passthrough.js
parent9b1b85490b6b242aabf84054a0a59ea1cf1c8dbc (diff)
downloadandroid-node-v8-545f5126190acacd14ce54799d1e3c5d6dcd9edb.tar.gz
android-node-v8-545f5126190acacd14ce54799d1e3c5d6dcd9edb.tar.bz2
android-node-v8-545f5126190acacd14ce54799d1e3c5d6dcd9edb.zip
streams2: ctor guards on Stream classes
Diffstat (limited to 'lib/_stream_passthrough.js')
-rw-r--r--lib/_stream_passthrough.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js
index 5acd27b260..0f2fe14c78 100644
--- a/lib/_stream_passthrough.js
+++ b/lib/_stream_passthrough.js
@@ -30,6 +30,9 @@ var util = require('util');
util.inherits(PassThrough, Transform);
function PassThrough(options) {
+ if (!(this instanceof PassThrough))
+ return new PassThrough(options);
+
Transform.call(this, options);
}