Permalink
Browse files

Writable references Duplex

  • Loading branch information...
1 parent 9bde881 commit 31838eb969d2ef1573da0f6d078a132b6b87ebba @isaacs isaacs committed Dec 1, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 writable.js
View
@@ -29,6 +29,7 @@ Writable.WritableState = WritableState;
var util = require('util');
var assert = require('assert');
var Stream = require('stream');
+var Duplex = require('./duplex.js');
util.inherits(Writable, Stream);
@@ -98,7 +99,7 @@ function WritableState(options, stream) {
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 Stream.Duplex))
+ if (!(this instanceof Writable) && !(this instanceof Duplex))
return new Writable(options);
this._writableState = new WritableState(options, this);

0 comments on commit 31838eb

Please sign in to comment.