Skip to content

Commit 9dfb4f3

Browse files
fix lint?
1 parent 18d4315 commit 9dfb4f3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/model.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3688,7 +3688,7 @@ Model.castObject = function castObject(obj, options) {
36883688
}
36893689

36903690
if (schemaType.$isMongooseDocumentArray) {
3691-
const castNonArraysOption = schemaType.options?.castNonArrays ??schemaType.constructor.options.castNonArrays;
3691+
const castNonArraysOption = schemaType.options?.castNonArrays ?? schemaType.constructor.options.castNonArrays;
36923692
if (!Array.isArray(val)) {
36933693
if (!castNonArraysOption) {
36943694
if (!options.ignoreCastErrors) {

lib/schema.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ const numberRE = /^\d+$/;
8787
* - [pluginTags](https://mongoosejs.com/docs/guide.html#pluginTags): array of strings - defaults to `undefined`. If set and plugin called with `tags` option, will only apply that plugin to schemas with a matching tag.
8888
* - [virtuals](https://mongoosejs.com/docs/tutorials/virtuals.html#virtuals-via-schema-options): object - virtuals to define, alias for [`.virtual`](https://mongoosejs.com/docs/api/schema.html#Schema.prototype.virtual())
8989
* - [collectionOptions]: object with options passed to [`createCollection()`](https://www.mongodb.com/docs/manual/reference/method/db.createCollection/) when calling `Model.createCollection()` or `autoCreate` set to true.
90+
* - [encryptionType]: the encryption type for the schema. Valid options are `csfle` or `queryable encryption`. See https://mongoosejs.com/docs/field-level-encryption.
9091
*
9192
* #### Options for Nested Schemas:
9293
*

0 commit comments

Comments
 (0)