-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 FilterMenu not saving simple filters #4836
Conversation
for (let i = 0, length = elems.length; i < length; i++) { | ||
if (elems[i].checked) { | ||
videoTypes.push(elems[i].getAttribute('data-filter')); | ||
for (const elem of context.querySelectorAll('.chkVideoTypeFilter')) { |
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.
forEach
is more portable (for legacy) than for..of
. 🤔
for..of
is transpiled into a large block with iterator.
☝️ this bothers me.
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.
It sounds like we should setup some eslint rules to prevent us from using some of these language features that make generated code more complex since it has came up a few times now. I can also disable related rules on the sonar side as needed.
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.
Tried eslint-plugin-no-for-of-loops
: 147 errors 😅
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.
Do you want to change the usages here or leave it as is?
85be670
to
37c69e3
Compare
37c69e3
to
fc37f82
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Cloudflare Pages deployment
|
Regression 6341a71
Changes
Issues
FilterMenu doesn't save simple filters because of
elems
override.