Skip to content

Commit

Permalink
fix(schema): support setting ref as an option on an array SchemaType
Browse files Browse the repository at this point in the history
Re: #10029
  • Loading branch information
vkarpov15 committed Mar 22, 2021
1 parent 171c31f commit 4b0052e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/schema/array.js
Expand Up @@ -60,6 +60,10 @@ function SchemaArray(key, cast, options, schemaOptions) {
}
}

if (options != null && options.ref != null && castOptions.ref == null) {
castOptions.ref = options.ref;
}

if (cast === Object) {
cast = Mixed;
}
Expand Down

0 comments on commit 4b0052e

Please sign in to comment.