Skip to content

fix: use for in loop in array is not right#6

Open
awesomeYG wants to merge 3 commits into
sormy:masterfrom
awesomeYG:master
Open

fix: use for in loop in array is not right#6
awesomeYG wants to merge 3 commits into
sormy:masterfrom
awesomeYG:master

Conversation

@awesomeYG

Copy link
Copy Markdown

No description provided.

@sormy sormy self-assigned this Feb 1, 2024
@sormy

sormy commented Feb 1, 2024

Copy link
Copy Markdown
Owner

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
Copy Markdown
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

sormy commented Feb 2, 2024

Copy link
Copy Markdown
Owner

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.

2 participants