react-selectrix
react-selectrix copied to clipboard
Object.entries doesn't work in older browsers
file src/helpers/index.js contains ES2017 Object.entries method which doesn't work in Safari 9.
Suggestion: refactor to make the code works in older browsers.
Hi,
We should use a polyfill instead of refactoring. Object.entries is not the only code that have issue with legacy browsers, so maybe babel-polyfill is an option, but we should check how much the bundle size will be increased.
If you have the time, a pull request will be great. Many thanks
Yep, I used Object.entries polyfill to make the package work in older browsers. In my case (Safari 9) Object.entries was the only thing which had to be polyfilled. The rest of the code works as expected with no errors. Here's the polyfill I used to solve the problem (for anyone with the same issue): https://stackoverflow.com/a/45851440/5476578
Thanks for the great library!