Skip to content

Commit

Permalink
Merge pull request #1607 from mohamedjkr/patch-1
Browse files Browse the repository at this point in the history
fix: allow defining path `type` option as an array
  • Loading branch information
kamilmysliwiec committed Nov 8, 2023
2 parents 19d4c15 + 6f8dbab commit 71ec922
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/factories/definitions.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class DefinitionsFactory {
) as mongoose.Schema;
}
return schemaDefinition;
} else if (typeof optionsOrType.type === 'function') {
} else if (typeof optionsOrType.type === 'function' || Array.isArray(optionsOrType.type)) {
optionsOrType.type = this.inspectTypeDefinition(optionsOrType.type);
return optionsOrType;
} else if (Array.isArray(optionsOrType)) {
Expand Down

0 comments on commit 71ec922

Please sign in to comment.