Skip to content

Extending native JavaScript objects is a bad practice #47

@mauteri

Description

@mauteri

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions