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

indexInArray fix. #435

Merged
merged 6 commits into from
Mar 6, 2014
Merged

indexInArray fix. #435

merged 6 commits into from
Mar 6, 2014

Conversation

prashn64
Copy link
Contributor

@prashn64 prashn64 commented Mar 6, 2014

Patching back to 2.1.x

Added a unit test as well in core.js

@kate2753
Copy link
Contributor

kate2753 commented Mar 6, 2014

Looks good to me. Parent commits look good too.

unit.equals(indexOf, 1);
indexOf = dust.indexInArray(arr, "foo");
unit.equals(indexOf, -1);
Array.prototype.indexOf = undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems a bit dangerous to do this without restoring indexOf when the test is over.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Tests will always pass in the older versions, so it can really only break in versions going forward, so I will add a commit to fix it for the latest.

@smfoote
Copy link
Contributor

smfoote commented Mar 6, 2014

Thanks!

smfoote added a commit that referenced this pull request Mar 6, 2014
@smfoote smfoote merged commit a43c995 into linkedin:master Mar 6, 2014
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 this pull request may close these issues.

3 participants