noderaider / redux-idle-monitor

A Redux component to schedule events at stages of user idleness across multiple browser tabs.
https://noderaider.github.io/redux-idle-monitor/
MIT License
105 stars 9 forks source link

Object doesn't support property or method 'includes' - IE11 #16

Closed damiangreen closed 7 years ago

damiangreen commented 7 years ago

In context.js.

return ['trace', 'debug', 'info'].includes(level)

Is there a recommended polyfill to get this working with IE11?

cchamberlain commented 7 years ago

core-js or any polyfill with Array.prototype.includes should work. Would also accept an ES5 PR if preferred.

On May 11, 2017 7:39 AM, "Damian Green" notifications@github.com wrote:

In context.js.

return ['trace', 'debug', 'info'].includes(level)

Is there a recommended polyfill to get this working with IE11?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/noderaider/redux-idle-monitor/issues/16, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ69hFxcXyGsaz_tz2iii8Hsi3AdsYjks5r4x25gaJpZM4NYGVb .

damiangreen commented 7 years ago

brilliant. I wasn't aware of core-js before. it's done the trick. For future readers:

require('core-js/fn/array/includes')

cchamberlain commented 7 years ago

Thanks for reporting, I will probably rewrite that part when I get some time to not require polyfills for not often used logging.