Skip to content

Commit

Permalink
doc: remove _writableState reference
Browse files Browse the repository at this point in the history
PR-URL: #20004
Fixes: #6799
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
apapirovski authored and jasnell committed Apr 16, 2018
1 parent 4f4e716 commit cb2e78a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -1652,8 +1652,7 @@ const { StringDecoder } = require('string_decoder');
class StringWritable extends Writable {
constructor(options) {
super(options);
const state = this._writableState;
this._decoder = new StringDecoder(state.defaultEncoding);
this._decoder = new StringDecoder(options && options.defaultEncoding);
this.data = '';
}
_write(chunk, encoding, callback) {
Expand Down

0 comments on commit cb2e78a

Please sign in to comment.