doc: remove _writableState reference

PR-URL: https://github.com/nodejs/node/pull/20004
Fixes: https://github.com/nodejs/node/issues/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>
This commit is contained in:
Anatoli Papirovski 2018-04-13 11:00:16 +02:00 committed by Ruben Bridgewater
parent dadddcbf7b
commit 4082bdf199
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762

View File

@ -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) {