Skip to content

Commit

Permalink
fix a couple of more legacy style header definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Aug 20, 2024
1 parent f905ac6 commit a563adc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ schema.pre('save', function(next) {
});
```

<h3 id="use-cases"><a href="#use-cases">Use Cases</a></h3>
### Use Cases

Middleware are useful for atomizing model logic. Here are some other ideas:

Expand All @@ -184,7 +184,7 @@ Middleware are useful for atomizing model logic. Here are some other ideas:
* asynchronous defaults
* asynchronous tasks that a certain action triggers

<h3 id="error-handling"><a href="#error-handling">Errors in Pre Hooks</a></h3>
### Errors in Pre Hooks {#error-handling}

If any pre hook errors out, mongoose will not execute subsequent middleware
or the hooked function. Mongoose will instead pass an error to the callback
Expand Down
2 changes: 1 addition & 1 deletion docs/subdocs.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ doc.level1.level2.parent() === doc.level1; // true
doc.level1.level2.ownerDocument() === doc; // true
```

<h3 id="altsyntaxarrays"><a href="#altsyntaxarrays">Alternate declaration syntax for arrays</a></h3>
### Alternate declaration syntax for arrays {#altsyntaxarrays}

If you create a schema with an array of objects, Mongoose will automatically convert the object to a schema for you:

Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/lean.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ In this tutorial, you'll learn more about the tradeoffs of using `lean()`.
* [Plugins](#plugins)
* [BigInts](#bigints)

<h2 id="using-lean"><a href="#using-lean">Using Lean</a></h2>
## Using Lean

By default, Mongoose queries return an instance of the
[Mongoose `Document` class](../api/document.html#Document). Documents are much
Expand Down Expand Up @@ -53,7 +53,7 @@ and virtuals don't run if you enable `lean`.
[require:Lean Tutorial.*getters and virtuals]
```

<h2 id="lean-and-populate"><a href="#lean-and-populate">Lean and Populate</a></h2>
## Lean and Populate

[Populate](../populate.html) works with `lean()`. If you
use both `populate()` and `lean()`, the `lean` option propagates to the
Expand All @@ -70,7 +70,7 @@ populated documents as well. In the below example, both the top-level
[require:Lean Tutorial.*virtual populate]
```

<h2 id="when-to-use-lean"><a href="#when-to-use-lean">When to Use Lean</a></h2>
## When to Use Lean

If you're executing a query and sending the results without modification to,
say, an [Express response](http://expressjs.com/en/4x/api.html#res), you should
Expand Down

0 comments on commit a563adc

Please sign in to comment.