stream: fix `Writable` subclass instanceof checks
2a4b068a introduced a regression in where checking `instanceof` would fail for `Writable` subclasses inside the subclass constructor, i.e. before `Writable()` was called. Also, calling `null instanceof Writable` or `undefined instanceof Writable` would fail due to accessing the `_writableState` property of the target object. This fixes these problems. PR-URL: https://github.com/nodejs/node/pull/9088 Ref: https://github.com/nodejs/node/pull/8834#issuecomment-253640692 Reviewed-By:Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By:
Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Evan Lucas <evanlucas@me.com>
parent
42158a03
Please register or sign in to comment