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

Array.prototype is modified by Collections JS #10

Open
adborden opened this issue Oct 1, 2013 · 0 comments
Open

Array.prototype is modified by Collections JS #10

adborden opened this issue Oct 1, 2013 · 0 comments

Comments

@adborden
Copy link

adborden commented Oct 1, 2013

Collections JS adds some methods to the Array.prototype. Since this added functionality doesn't seem to be an explicit intention of assetflow, it seems weird to have it as a dependency.

Specifically, we're using Sugar JS and Collection's Array.find method collides with Sugar's Array.find which is an unintended consequence of using assetflow.

  assert = require('assert');

  assert.equal(Array.prototype.find, void 0, "Prototype modified before assetflow");

  require('assetflow');

  assert.equal(Array.prototype.find, void 0, "Prototype modified after assetflow");

Output: Prototype modified after assetflow

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