Skip to content

Commit

Permalink
fix: handle validation for types other than object
Browse files Browse the repository at this point in the history
  • Loading branch information
ggurkal committed Jun 22, 2022
1 parent 7a651de commit 9d6f8a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internals/validateObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function validateObject(
return value;
}

if (value == null || (typeof value === 'string' && !value.trim().length)) {
if (value == null || typeof value !== 'object') {
value = {};
}

Expand Down

0 comments on commit 9d6f8a9

Please sign in to comment.