Skip to content

Commit 7ba5500

Browse files
committed
fix: add missing optional chaining operator
1 parent 51ba66d commit 7ba5500

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/fs.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7638,7 +7638,7 @@ try {
76387638
fd = await open('/open/some/file.txt', 'r');
76397639
// Do something with the file
76407640
} finally {
7641-
await fd.close();
7641+
await fd?.close();
76427642
}
76437643
```
76447644
@@ -7652,7 +7652,7 @@ try {
76527652
fd = await open('file.txt', 'r');
76537653
// Do something with the file
76547654
} finally {
7655-
await fd.close();
7655+
await fd?.close();
76567656
}
76577657
```
76587658
@@ -7767,7 +7767,7 @@ try {
77677767
fd = await open(Buffer.from('/open/some/file.txt'), 'r');
77687768
// Do something with the file
77697769
} finally {
7770-
await fd.close();
7770+
await fd?.close();
77717771
}
77727772
```
77737773

0 commit comments

Comments
 (0)