Skip to content

Commit

Permalink
Update schema.md
Browse files Browse the repository at this point in the history
  • Loading branch information
royrico authored and ejscribner committed Jun 10, 2024
1 parent 03545fc commit 66003f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docusaurus/docs/basic/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ const Animal = model('Animal', animalSchema);
let animals = await Animal.findByName('fido');
```

::: danger Note
:::danger Note
Do **not** declare _statics_ using ES6 arrow functions (`=>`). Arrow functions [explicitly prevent binding](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions) `this`, so the above examples will **not** work because of the value of `this`.
:::

Expand Down

0 comments on commit 66003f8

Please sign in to comment.