Skip to content

Commit

Permalink
docs(reference): grammar and structure fixes (#4348)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Oct 17, 2022
1 parent 846885f commit 7a566cb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
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

0 comments on commit 7a566cb

Please sign in to comment.