From dec3def97326d1164d7e3ac7bba37b5edddab8ff Mon Sep 17 00:00:00 2001 From: Henri Koskinen Date: Mon, 18 Jul 2022 12:35:04 +0300 Subject: [PATCH] Fix typo --- docs/concepts/ORM/model-settings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/concepts/ORM/model-settings.md b/docs/concepts/ORM/model-settings.md index 1f18116256..63e138316a 100644 --- a/docs/concepts/ORM/model-settings.md +++ b/docs/concepts/ORM/model-settings.md @@ -86,7 +86,7 @@ customToJSON: function() { } ``` -The customToJSON function is deisgned not to support async capabilities. This allows synchronous bits in core to stay synchronous and provide better stability to the system as a whole. +The customToJSON function is designed not to support async capabilities. This allows synchronous bits in core to stay synchronous and provide better stability to the system as a whole. > Note that the `this` variable available in `customToJSON` is a _direct reference to the actual record object_, so be careful not to modify it. In other words, avoid writing code like `delete this.password`. Instead, use methods like `_.omit()` or `_.pick()` to get a _copy_ of the record. Or just construct a new dictionary and return that (e.g. `return { foo: this.foo }`).