Skip to content

Commit

Permalink
fix: add missing optional chaining operator
Browse files Browse the repository at this point in the history
  • Loading branch information
jakecastelli committed Mar 4, 2023
1 parent 51ba66d commit 7ba5500
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7638,7 +7638,7 @@ try {
fd = await open('/open/some/file.txt', 'r');
// Do something with the file
} finally {
await fd.close();
await fd?.close();
}
```
Expand All @@ -7652,7 +7652,7 @@ try {
fd = await open('file.txt', 'r');
// Do something with the file
} finally {
await fd.close();
await fd?.close();
}
```
Expand Down Expand Up @@ -7767,7 +7767,7 @@ try {
fd = await open(Buffer.from('/open/some/file.txt'), 'r');
// Do something with the file
} finally {
await fd.close();
await fd?.close();
}
```
Expand Down

0 comments on commit 7ba5500

Please sign in to comment.