Skip to content

Commit

Permalink
fix(utils): flip order of nativeControlValidity filter predicate check (
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwarren1106 authored Jan 26, 2023
1 parent 109c2d2 commit ce5aea2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const initLabels = (ref: ICustomElement, labels: LabelsList): void => {
*/
export const setFormValidity = (form: HTMLFormElement) => {
const nativeControlValidity = Array.from(form.elements)
.filter((element: Element & { validity: ValidityState }) => element.validity && !element.tagName.includes('-'))
.filter((element: Element & { validity: ValidityState }) => !element.tagName.includes('-') && element.validity)
.map(
(element: Element & { validity: ValidityState }) => element.validity.valid
);
Expand Down

0 comments on commit ce5aea2

Please sign in to comment.