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

Internet explorer compatibility broken #44

Closed
mdix opened this issue Dec 11, 2019 · 7 comments · Fixed by #58
Closed

Internet explorer compatibility broken #44

mdix opened this issue Dec 11, 2019 · 7 comments · Fixed by #58

Comments

@mdix
Copy link

mdix commented Dec 11, 2019

Using findIndex w/o polyfilling breaks notyf in all available Internet Explorers.

Usage:

const userTypeIdx = incomingTypes.findIndex((t) => t.type === defaultType.type);

Error in Internet Explorer:
Screenshot 2019-12-11 at 13 02 18

@caroso1222
Copy link
Owner

Good catch, thanks for opening the issue. I didn't really have any plans of supporting IE (unpopular opinion, I know) but if this is the only pain point to make it work in IE then I'll look into it and fix it in the next patch. Thanks again for noting it!

@mdix
Copy link
Author

mdix commented Dec 11, 2019

Thanks. I'm glad to hear that and yes, it is the only thing that prevents notyf from working in IE11. After I polyfilled Array.prototype.findIndex everything worked as expected.

@mdix
Copy link
Author

mdix commented Dec 11, 2019

You can just put this in a file and use it, I guess.

@terales
Copy link

terales commented Jan 6, 2020

@caroso1222 would you accept a PR on this?

I'll just implement the old way of finding an index instead of a modern "findIndex" method to make it usable without any polyfills.

@caroso1222
Copy link
Owner

Hey @terales. Sorry for the late reply, still coming back from holidays. Yeah definitely, thanks! Take a stab at it and I'll review the PR.

@terales
Copy link

terales commented Apr 2, 2020

@mdix can you prepare a PR, please?

I'm on Ubuntu since January and it seems that I would be without available Windows machine for a while now.

@caroso1222
Copy link
Owner

Fixed it already. Thank you all for the help! 😃

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 a pull request may close this issue.

3 participants