From 3ee4cfc7d7913f3c8477a7be476ec20d8f539be4 Mon Sep 17 00:00:00 2001 From: Maksym Baranovskyi Date: Mon, 14 Dec 2020 05:11:56 +0200 Subject: [PATCH] doc: fix bugs in _construct() example PR-URL: https://github.com/nodejs/node/pull/36509 Reviewed-By: Antoine du Hamel Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott Reviewed-By: Robert Nagy --- 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 4b4b0b34440695..e0e1145dad1048 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 {