Browse Source

streams2: Fix regression from Duplex ctor assignment

v0.9.4-release
isaacs 12 years ago
parent
commit
e82d06bef9
  1. 3
      lib/_stream_writable.js

3
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);

Loading…
Cancel
Save