Remove duplicate condition

This commit is contained in:
Ben Croker 2020-09-30 10:33:28 +02:00 committed by GitHub
parent a9ffe0e617
commit 9fbcc5c5a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1368,7 +1368,7 @@ return (function () {
}
function validateElement(element, errors) {
if (element.checkValidity && element.willValidate) {
if (element.willValidate) {
triggerEvent(element, "htmx:validation:validate")
if (!element.checkValidity()) {
errors.push({elt: element, message:element.validationMessage, validity:element.validity});