Skip to content

Commit

Permalink
Merge branch 'master' of github.com:hexlabsio/schema-api-ts
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbarbour committed Mar 3, 2024
2 parents de64e82 + bd0477b commit 94fa3de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ class ArrayValidator {
class ObjectValidator {

static objectValidation(value: any, location: string, schema: SchemaInfo): Invalid[] {
const valid = typeof value === 'object' && !Array.isArray(value);
const valid = value !== null && typeof value === 'object' && !Array.isArray(value);
return validate(value, location, schema, () => `Expected value to be an object`, valid)
}

Expand Down

0 comments on commit 94fa3de

Please sign in to comment.