Skip to content

Avoid modifying Array.prototype #66

Description

@andriokha

Hi, thanks for the layout builder support, we have a happy YMCA (:

However we noticed when we added it to a branch page that the map stopped working. I seem to have narrowed it down to the geolocation module's JS not playing nicely with library-davekoelle/alphanum updating Array.prototype. I've added an MR to this geolocation issue that solves the problem I'm facing (see this explanation), but I thought it might also be good to program this module defensively and not pollute the global Array.prototype, at least while it's still common for folk to use jQuery.extend(). Could we maybe namespace it to window.OpenY.something?

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions