-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: prevent possible errors when inputs property is not set #8012
Conversation
const invalidFields = this.inputs.filter((input) => !(input.validate || input.checkValidity).call(input)); | ||
|
||
if (invalidFields.length || (this.required && !this.value.trim())) { | ||
if ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, thanks. I will check other methods too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the PR. I wasn't able to reproduce this exact error though as typically the web component can only receive and then lose focus when it is connected to the DOM and by this point of time inputs
is set to empty array.
c968a1a
to
fc26ed1
Compare
fc26ed1
to
70770f8
Compare
Co-authored-by: Sergey Vinogradov <[email protected]>
Quality Gate passedIssues Measures |
Hi @web-padawan and @web-padawan, when i performed cherry-pick to this commit to 24.4, i have encountered the following issue. Can you take a look and pick it manually? |
@web-padawan Just seen that you added target 24.4 but I never had this problems in 24.4. So maybe backport is not needed as there is all ok? |
…8020) Co-authored-by: Serhii Kulykov <[email protected]>
We do have problems with the original change using the latest v24.4.17 platform (v24.4.12 Vaadin Flow) version. In some cases the
@web-padawan could you backport this fix to the 24.4 branch as well? 🙏🙇♂️ |
Description
Fixes vaadin/flow-components#6739
Updated
checkValidity()
method to check thatthis.inputs
andthis.value
are defined before accessing them.Type of change