From e82d06bef9c2de480f8c21ea195c876811b275e1 Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 9 Oct 2012 17:42:47 -0700 Subject: [PATCH] streams2: Fix regression from Duplex ctor assignment --- lib/_stream_writable.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js index a84cbc3785e..1f6f5112a03 100644 --- a/lib/_stream_writable.js +++ b/lib/_stream_writable.js @@ -27,7 +27,6 @@ module.exports = Writable var util = require('util'); var Stream = require('stream'); -var Duplex = require('_stream_duplex'); util.inherits(Writable, Stream); @@ -60,7 +59,7 @@ function WritableState(options) { function Writable(options) { // Writable ctor is applied to Duplexes, though they're not // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) + if (!(this instanceof Writable) && !(this instanceof Stream.Duplex)) return new Writable(options); this._writableState = new WritableState(options);