From 22764c45c6be6a9756c235f9c0bcf63e8cd41dcb Mon Sep 17 00:00:00 2001 From: Maksym Baranovskyi Date: Mon, 14 Dec 2020 05:11:56 +0200 Subject: [PATCH] Two bugs in the _construct() example fixed --- 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 936a81cc6e4219..58db4232f85c1d 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -2078,10 +2078,9 @@ class WriteStream extends Writable { constructor(filename) { super(); this.filename = filename; - this.fd = fd; } _construct(callback) { - fs.open(this.filename, (fd, err) => { + fs.open(this.filename, (err, fd) => { if (err) { callback(err); } else {