Skip to content

Commit 46377b8

Browse files
Update doc/api/webstreams.md
Co-authored-by: James M Snell <[email protected]>
1 parent c9f7ecf commit 46377b8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/api/webstreams.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ async function* asyncIterableGenerator() {
451451

452452
const stream = ReadableStream.from(asyncIterableGenerator());
453453

454-
stream.pipeTo(createWritableStreamSomehow());
454+
await stream.pipeTo(createWritableStreamSomehow());
455455
```
456456

457457
```cjs
@@ -466,7 +466,9 @@ async function* asyncIterableGenerator() {
466466

467467
const stream = ReadableStream.from(asyncIterableGenerator());
468468

469-
stream.pipeTo(createWritableStreamSomehow());
469+
(async () => {
470+
await stream.pipeTo(createWritableStreamSomehow());
471+
})();
470472
```
471473

472474
### Class: `ReadableStreamDefaultReader`

0 commit comments

Comments
 (0)