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

Problem with code that pollute array prototype #75

Closed
jcubic opened this issue Jul 23, 2021 · 0 comments · Fixed by #76
Closed

Problem with code that pollute array prototype #75

jcubic opened this issue Jul 23, 2021 · 0 comments · Fixed by #76

Comments

@jcubic
Copy link
Contributor

jcubic commented Jul 23, 2021

I use filget.js with ROT.js library (for rouge like games) and it modify Array prototype and it break figlet. This can be easy fixed. The problem is this line:

for(var i in fonts){
   me.parseFont(fonts[i], fontData[i]);
}

the loop should use hasOwnProperty to filter out stuff from prototype.

@jcubic jcubic changed the title Problem with code that pollute arrays Problem with code that pollute arrays prototypes Jul 23, 2021
@jcubic jcubic changed the title Problem with code that pollute arrays prototypes Problem with code that pollute array prototype Jul 23, 2021
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 a pull request may close this issue.

1 participant