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

For...in loops #523

Open
cwillinx opened this issue May 29, 2024 · 0 comments
Open

For...in loops #523

cwillinx opened this issue May 29, 2024 · 0 comments

Comments

@cwillinx
Copy link

cwillinx commented May 29, 2024

In the code two times a for...in loop is used.

For...in also iterates over additional properties added to the array prototype.

I had an issue with this when using Micromodal in a 3rd party contect, where the array prototype got additional functions added. This let to a complete failure of the code.

@cwillinx cwillinx changed the title Use for...of instead of for...in loops For...in loops May 29, 2024
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

No branches or pull requests

1 participant