Skip to content

Commit fde2bec

Browse files
authored
Merge pull request #13925 from peteboere/patch-1
Amend some awkward FAQ wording
2 parents 803fd5b + 92d3513 commit fde2bec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ is undefined on the underlying [POJO](guide.html#minimize).
139139

140140
<a class="anchor" href="#arrow-functions">**Q**</a>. I'm using an arrow function for a [virtual](guide.html#virtuals), [middleware](middleware.html), [getter](api/schematype.html#schematype_SchemaType-get)/[setter](api/schematype.html#schematype_SchemaType-set), or [method](guide.html#methods) and the value of `this` is wrong.
141141

142-
**A**. Arrow functions [handle the `this` keyword much differently than conventional functions](https://masteringjs.io/tutorials/fundamentals/arrow#why-not-arrow-functions).
142+
**A**. Arrow functions [handle the `this` keyword differently than conventional functions](https://masteringjs.io/tutorials/fundamentals/arrow#why-not-arrow-functions).
143143
Mongoose getters/setters depend on `this` to give you access to the document that you're writing to, but this functionality does not work with arrow functions. Do **not** use arrow functions for mongoose getters/setters unless do not intend to access the document in the getter/setter.
144144

145145
```javascript

0 commit comments

Comments
 (0)