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

Extending native JavaScript objects is a bad practice #47

Open
mauteri opened this issue Dec 18, 2015 · 5 comments
Open

Extending native JavaScript objects is a bad practice #47

mauteri opened this issue Dec 18, 2015 · 5 comments

Comments

@mauteri
Copy link

mauteri commented Dec 18, 2015

I noticed in a few spots that JavaScript's native Array and String objects are being extended by Liquid with clear, first, last, etc.

With Liquid on our site, we ran into some pretty nasty bugs due to this and had to roll code back. Is there a reason this needs to be done as a property rather than creating helpers for this functionality? I'd be happy to provide a pull request to change this bit of code.

mauteri added a commit to mauteri/liquid.js that referenced this issue Dec 21, 2015
@mauteri
Copy link
Author

mauteri commented Dec 21, 2015

Added pull request that just sets enumerable to false to prevent Liquid properties from showing up in for...in loops.

@ghost ghost mentioned this issue Mar 9, 2016
@maxfrigge
Copy link

I hit this issue too... would be an easy merge. May I ask why this has not been accepted?

@maxfrigge
Copy link

Ok.. so it seems to be fixed in master. Are there any known issues in master?

@h0jeZvgoxFepBQ2C
Copy link

Yeah, whats the status of this issue?

@mauteri
Copy link
Author

mauteri commented Feb 26, 2018

Project looks pretty much abandoned to me... Last commit was December 5, 2016... :-/

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

3 participants