Skip to content

Commit

Permalink
doc: fix bugs in _construct() example
Browse files Browse the repository at this point in the history
PR-URL: #36509
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
  • Loading branch information
mkbaranovskyi authored and danielleadams committed Jan 12, 2021
1 parent 10f1c89 commit 3ee4cfc
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 @@ -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 {
Expand Down

0 comments on commit 3ee4cfc

Please sign in to comment.