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 authored and Nicolas Le Cam committed Feb 12, 2023
1 parent e1fa9dc commit 614c855
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 614c855

Please sign in to comment.