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

IE11 reports the following problem: Object doesn't support property or method 'assign' #32

Open
shivshankar2020 opened this issue May 15, 2016 · 5 comments

Comments

@shivshankar2020
Copy link

Does not work IE 11 (Version: 11.0.9600.18097) . Please try loading the demo page and check the console:
http://kyleamathews.github.io/react-spinkit/

Reported by console:
Object doesn't support property or method 'assign'

Part of the code having the problem:

switch (this.props.spinnerName) {
          case "three-bounce":
            __webpack_require__(164);
            return React.createElement("div", Object.assign({}, this.props, {
              "className": "three-bounce " + classes
            }), React.createElement("div", {
              "className": "bounce1"
            }), React.createElement("div", {
              "className": "bounce2"
            }), React.createElement("div", {
              "className": "bounce3"
            }));
@ofilipowicz
Copy link

Same error here. Google Chrome.

@musbaig
Copy link

musbaig commented Jun 7, 2016

I believe react-spinkit is not being transpiled to es5, as a result, you'll need to use babel-polyfill (via webpack) for it to behave in IE11. babel-runtime won't help either, has to be the polyfill. I haven't seen issues with Chrome though. Just my 2¢.

@KyleAMathews
Copy link
Owner

React Spinkit is written in Coffeescript so kinda has to be transpiled to es5 to work :-) https://github.com/KyleAMathews/react-spinkit/blob/master/src/index.cjsx

Requiring a polyfill to use this module does seem silly though. One possible way forward would be to just convert the src to use Babel as it's the Coffee-React transformer that's adding Object.assign. Another way forward would be to add a polyfill similar to KyleAMathews/react-gravatar@ec50674.

PRs accepted :-)

@ghost
Copy link

ghost commented Jul 12, 2016

Or replace with lodash.assign.

@merrywhether
Copy link
Collaborator

I think this was fixed with the ES6/Babel rewrite.

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

No branches or pull requests

5 participants