-
Notifications
You must be signed in to change notification settings - Fork 479
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
indexInArray fix. #435
Conversation
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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Thanks! |
Patching back to 2.1.x
Added a unit test as well in core.js