Skip to content

Commit

Permalink
Take no required input as step validated
Browse files Browse the repository at this point in the history
  • Loading branch information
qiyundai committed May 9, 2024
1 parent 8c52984 commit c9e1bc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blocks/form-handler/form-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ function querySelectorDeep(selector, root = document) {
}

function validateRequiredFields(fields) {
return Array.from(fields).every((f) => f.value)
return fields.length === 0 || Array.from(fields).every((f) => f.value)
}

function prepopulateForm(el, inputMap) {
Expand Down

0 comments on commit c9e1bc2

Please sign in to comment.