Skip to content

Commit

Permalink
refactor: remove usage of _.isUndefined
Browse files Browse the repository at this point in the history
  • Loading branch information
mjeanroy committed Mar 9, 2024
1 parent 7a6f484 commit 1e7e8e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/schema-validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function validateObject(obj, schema, current) {
function validateArrayItem(item, idx, schema, current) {
const path = [...current, idx];

if (_.isUndefined(item)) {
if (typeof item === 'undefined') {
return [{path, message: `"${formatPath(path)}" is undefined.`}];
}

Expand Down

0 comments on commit 1e7e8e5

Please sign in to comment.