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 May 15, 2023
1 parent a99fd4b commit 2d627e7
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 2d627e7

Please sign in to comment.