From 4b88254820bf9ecd92cedffeed6c42202e285a46 Mon Sep 17 00:00:00 2001 From: Anatoli Papirovski Date: Fri, 13 Apr 2018 11:00:16 +0200 Subject: [PATCH] doc: remove _writableState reference --- doc/api/stream.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 14724e8311a45f..2bde10c1fefe65 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -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) {