marcio / react-skylight

A react component for modals and dialogs
http://marcio.github.io/react-skylight/
MIT License
571 stars 97 forks source link

Polyfill Object.assign() if not available (currently affects IE11) #36

Closed drywolf closed 8 years ago

drywolf commented 8 years ago

Hi, I'm running react-skylight in my app and am testing it now across browsers.

I found that react-skylight depends on Object.assign() in the skylightstateless.jsx code, which crashes in IE11 because Object.assign() is not yet available in the browser.

For now I worked around this issue by introducing a polyfill into my app, but there really should be a proper fail-safe handling in react-skylight that either throws an error to inform the developer that they need to introduce a polyfill when using react-skylight, or react-skylight could include it's own polyfill to fall back to if it is not natively supported by the browser it is running in.

(for example the Mozilla polyfill code could be used)

Regards, Wolfgang

marcio commented 8 years ago

Hi @drywolf

Thanks for your feedback, I'll work in issue soon.

Regards!

khanghoang commented 8 years ago

@marcio i just made PR for it, please review