Skip to content

Commit

Permalink
Don't error out on undefined options
Browse files Browse the repository at this point in the history
  • Loading branch information
KuSh committed Jul 14, 2023
1 parent 84539b2 commit d7dc82a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sign.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ function validate(schema, allowUnknown, object, parameterName) {
}
Object.keys(object)
.forEach(function(key) {
// Don't validate undefined attribute
if (object[key] === undefined) {
return;
}

const validator = schema[key];
if (!validator) {
if (!allowUnknown) {
Expand Down

0 comments on commit d7dc82a

Please sign in to comment.