Skip to content
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: use for in loop in array is not right #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

awesomeYG
Copy link

No description provided.

@sormy sormy self-assigned this Feb 1, 2024
@sormy
Copy link
Owner

sormy commented Feb 1, 2024

Well, you can rewrite it to of, but it should be for (var rule of rules) { then. What is the problem are you trying to solve? There are unit tests that are covering almost all use cases.

@awesomeYG
Copy link
Author

Well, you can rewrite it to of, but it should be for (var rule of rules) { then. What is the problem are you trying to solve? There are unit tests that are covering almost all use cases.

oooh, you're right

@sormy
Copy link
Owner

sormy commented Feb 2, 2024

This change is incorrect for (var rules of rules) {, supposed to be for (var rule of rules) {. What is the problem this change is supposed to solve? There is no good reason to rewrite to functionally equivalent "for of" loop and introduce es6 syntax while the rest of codebase remains es5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants