streams2: Fix regression from Duplex ctor assignment
This commit is contained in:
parent
f3e71eb417
commit
e82d06bef9
@ -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…
x
Reference in New Issue
Block a user