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

Symbol is undefined in IE11 #798

Closed
rahul1059 opened this issue Jan 5, 2018 · 3 comments
Closed

Symbol is undefined in IE11 #798

rahul1059 opened this issue Jan 5, 2018 · 3 comments
Labels

Comments

@rahul1059
Copy link

IE11 doesn't support Symbol and error is displayed in console whenever form has any validation error.
I don't want to add huge babel-polyfill for this. Is there any way to fix it quickly.
image

@Natim
Copy link
Contributor

Natim commented Jan 5, 2018

I would be glad if you could investigate this error and start suggesting a fix for it.

@edi9999
Copy link
Collaborator

edi9999 commented Jan 11, 2018

It seems to be in the bundle.js file without a test for typeof Symbol === "function" beforehand :

...
for(var l,u=n[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var c=l.value;if(c=c.replace(/~1/g,"/").replace(/~0/g,"~"),!o.hasOwnProperty(c))throw new Error("Could not find a definition for "+e+".");o=o[c]}
...

Line 29, Character 29661

@edi9999 edi9999 added the bug label Jan 13, 2018
graingert added a commit to graingert/react-jsonschema-form that referenced this issue Jul 19, 2018
graingert added a commit to graingert/react-jsonschema-form that referenced this issue Jul 19, 2018
graingert added a commit to graingert/react-jsonschema-form that referenced this issue Jul 19, 2018
graingert added a commit to graingert/react-jsonschema-form that referenced this issue Jul 23, 2018
@KiranChaudhariJM
Copy link

KiranChaudhariJM commented Sep 15, 2018

This solution will work for sure, it worked for me when I encountered the error: 'Symbol' is undefined in IE . It worked earlier in Chrome and Firefox but IE was throwing this error.It took me few hours to find this solution.
I am using the latest React at this time react "react": "^16.5.0" on windows machine.

1. Install babel-polyfill
npm install --save-dev babel-polyfill
In package.json, it should have the following entries

"devDependencies": {
    "babel-core": "^6.26.3",
    "babel-loader": "^8.0.2",
    "babel-polyfill": "^6.26.0",
    "babel-preset-react": "^6.24.1"
  }

2. In index.js, add

    import babelPolyfill from 'babel-polyfill';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants