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

add polyFillFindIndex function in order to bug fix in IE11 #2491

Conversation

nicosang
Copy link
Contributor

Hi,

this PR has to solve issue #2489.

Nico

@epiclabsDASH epiclabsDASH added this to the 2.6.8 milestone Mar 26, 2018
@davemevans
Copy link
Contributor

davemevans commented Mar 26, 2018

This solution is ok, but I think it would be preferable to rework the section calling findIndex rather than modify the Array prototype. I think something like the below (NOTE: UNTESTED) should have the same effect and will transpile correctly with our current setup:

tracks.some((item, idx) => {
    if (item.lang === defaultLanguage) {
         this.setTextTrack(idx);
         index = idx;
         return true;
    }
});

@nicosang
Copy link
Contributor Author

nicosang commented Mar 27, 2018

you're right @bbcrddave ....it's a little bit simpliest.... ;-)

Many thanks!

@epiclabsDASH epiclabsDASH merged commit f420eb9 into Dash-Industry-Forum:development Mar 30, 2018
@nicosang nicosang deleted the addPolyFillFindIndex branch March 30, 2018 09:43
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.

None yet

3 participants