-
-
Notifications
You must be signed in to change notification settings - Fork 529
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
Add guard-clause to clearDirty method #16404
Conversation
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.
For the simple purpose of avoiding error, this does the job. Supporting checkboxgroup/radiogroup types may need to be revisited, as it's hard to know whether the clearDirty method is taking effect on those component types without setting up a special CMP for the purpose of testing.
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## 3.x #16404 +/- ##
============================================
- Coverage 21.73% 17.90% -3.84%
+ Complexity 10483 10480 -3
============================================
Files 561 561
Lines 31614 39240 +7626
============================================
+ Hits 6872 7024 +152
- Misses 24742 32216 +7474 ☔ View full report in Codecov by Sentry. |
Very nice! 🦾 |
### What does it do? This makes sure the JS doesn't throw an error in the case that the items-object is an array, just like in #16404 for 3.x ### Why is it needed? When using ExtJS to create components of the xtype: 'radiogroup' to be used in CMPs inside a form, this function gets called and tries to iterate over it's items array with a method that doesn't exist. This PR isn't changing the way forms or the clearDirty-method are handled, it just assures no error is thrown when using radiogroup-components. ### Related issue(s)/PR(s) Resolves modmore/ClientConfig#202 Resolves modmore/ClientConfig#176 Resolves modmore/ClientConfig#143 --------- Co-authored-by: Jason Coward <jason@opengeek.com>
What does it do?
This makes sure the JS doesn't throw an error in the case that the items-object is an array.
Why is it needed?
When using ExtJS to create components of the
xtype: 'radiogroup'
to be used in CMPs inside a form,this function gets called and tries to iterate over it's items array with a method that doesn't exist.
This PR isn't changing the way forms or the clearDirty-method are handled, it just assures no error is thrown when using radiogroup-components.
Related issue(s)/PR(s)
Resolves #12177
Resolves modmore/ClientConfig#202
Resolves modmore/ClientConfig#176
Resolves modmore/ClientConfig#143