Skip to content

Commit

Permalink
fix(json-schema): fix mongoose usecases
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Aug 31, 2023
1 parent f847be7 commit 059de4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/specs/json-mapper/src/domain/JsonSerializer.ts
Expand Up @@ -214,7 +214,7 @@ export class JsonSerializer extends JsonMapperCompiler<JsonSerializerOptions> {
}

private mapObject(input: any, {type, ...options}: JsonSerializerOptions) {
if (input && isPrimitive(input)) {
if ((input && isPrimitive(input)) || !input) {
// prevent mongoose mapping error
return input;
}
Expand Down

0 comments on commit 059de4a

Please sign in to comment.