-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Have a clear polyfill story #320
Comments
Personally I'd be in favour of calling it out in the docs and having a warning presented in the console. if (!Array.prototype.find) {
console.warn('Array.prototype.find support not found, please include a polyfill if you would like to support this browser's);
} Could strip the whole thing out in production builds if you wanted to too. Ie11 will never support find, so doing anything else would be locking yourself in to including this polyfill everywhere, forever. If you wanted to be even more explicit, maybe you could use https://github.com/paulmillr/Array.prototype.find instead of Babel polyfill? I think that would be worse in general though, more chance you could miss it, more chance you'd need more polyfills later. |
Thanks @lukebatchelor |
I think it might be best just to avoid .find alltogether and use a .filter[0] |
This will be done as a part of #838 |
from #319
We are currently using array.prototype.find in a few places which is not awesome for ie11. Either we need to be clear about what polyfills are required, or remove any usages of prototype methods that require > ie 11.
The text was updated successfully, but these errors were encountered: