docs(server-renderer): fix typo in renderToWebStream error, and remove Cloudflare Worker reference (#4249) [ci skip]

This commit is contained in:
James Ross 2021-08-06 16:23:12 +01:00 committed by GitHub
parent d045055b47
commit 17cc4e15a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ function renderToWebStream(
**Usage**
```js
// e.g. inside a Cloudflare Worker
// e.g. inside an environment with ReadableStream support
return new Response(renderToWebStream(app))
```

View File

@ -129,7 +129,7 @@ export function renderToWebStream(
): ReadableStream {
if (!Ctor && !hasGlobalWebStream) {
throw new Error(
`ReadableStream constructor is not avaialbe in the global scope and ` +
`ReadableStream constructor is not available in the global scope and ` +
`must be explicitly passed in as the 3rd argument:\n\n` +
` import { ReadableStream } from 'stream/web'\n` +
` const stream = renderToWebStream(app, {}, ReadableStream)`