Skip to content

Commit

Permalink
docs(middleware): some cleanup re: #5866
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Dec 6, 2017
1 parent f4c06e5 commit a11c05e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/middleware.jade
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ block content
:markdown
The `next()` call does **not** stop the rest of the code in your middleware function from executing. Use
[the early `return` pattern](https://www.bennadel.com/blog/2323-use-a-return-statement-when-invoking-callbacks-especially-in-a-guard-statement.htm)
if you want to stop execution when you call `next()`.
to prevent the rest of your middleware function from running when you call `next()`.
:js
var schema = new Schema(..);
schema.pre('save', function(next) {
Expand Down

0 comments on commit a11c05e

Please sign in to comment.