Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(reference): grammar and structure fixes #4348

Merged
merged 1 commit into from Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Reference/Errors.md
Expand Up @@ -332,7 +332,7 @@ The router received an invalid url.
### FST_ERR_ASYNC_CONSTRAINT
<a id="FST_ERR_ASYNC_CONSTRAINT"></a>

The router received error when using asynchronous constraints.
The router received an error when using asynchronous constraints.

#### FST_ERR_DEFAULT_ROUTE_INVALID_TYPE
<a id="FST_ERR_DEFAULT_ROUTE_INVALID_TYPE"></a>
Expand Down
6 changes: 3 additions & 3 deletions docs/Reference/Hooks.md
Expand Up @@ -449,9 +449,9 @@ fastify.addHook('onRoute', (routeOptions) => {
})
```

If you want to add more routes within an onRoute hook, you have to tag these
routes properly. If you don't, the hook will run into an infinite loop. The
recommended approach is shown below.
To add more routes within an onRoute hook, the routes must
be tagged correctly. The hook will run into an infinite loop if
not tagged. The recommended approach is shown below.

```js
const kRouteAlreadyProcessed = Symbol('route-already-processed')
Expand Down
6 changes: 3 additions & 3 deletions docs/Reference/Routes.md
Expand Up @@ -734,9 +734,9 @@ fastify.route({

#### Asynchronous Custom Constraints

You can provide your custom constraints and the `constraint` criteria can be
fetched from other source, for example `database`. Usage of asynchronous custom
constraint should place at the last resort since it impacts the router
Custom constraints can be provided and the `constraint` criteria can be
fetched from another source such as `database`. The use of asynchronous
custom constraints should be a last resort as it impacts router
performance.

```js
Expand Down