Skip to content

Components throw a 'Symbol.iterator' error in Microsoft Edge #1424

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

Closed
hwatersiv opened this issue Aug 15, 2019 · 15 comments
Closed

Components throw a 'Symbol.iterator' error in Microsoft Edge #1424

hwatersiv opened this issue Aug 15, 2019 · 15 comments

Comments

@hwatersiv
Copy link

Expected behavior

React-intl Components function without throwing an error in Microsoft Edge

Current behavior

Currently, and throw an error in Microsoft Edge 44.18362.267.0

SCRIPT438: SCRIPT438: Object doesn't support property or method 'Symbol.iterator'

Step to reproduce for BUG REPORT

Use FormatDate or FormatNumber Component

For example:
used the React-intl Examples

Your Environment

Executable Version
typescript 3.5.3
react-dom 16.9.0
npm ls react-intl 3.1.8
npm ls react 16.9.0
npm --version 6.7.0
node --version 11.13.0
OS Version
Windows 10 18362
Browser Version
Microsoft Edge 44.18362.267.0
@hwatersiv
Copy link
Author

Issue does NOT occur in 3.1.1

@longlho
Copy link
Member

longlho commented Aug 15, 2019

Thanks for reporting we'll take a look soon.

@longlho
Copy link
Member

longlho commented Aug 16, 2019

I can't seem to repro. Our example works in both IE11 & Edge

image

image

@CGNonofr
Copy link

We face the same error, it seems related to cb7da58#diff-fe1b24f653b989ecd950765cabe4a1d5

@MaximeCheramy
Copy link

I confirm that rollbacking to 3.1.1 fixes that crash on Edge.

@ipanasenko
Copy link
Contributor

Guys, any updates? Is v3.1.1 safe to use? I mean there were Firefox and empty string in values issues, are they present in 3.1.1?

@longlho
Copy link
Member

longlho commented Aug 20, 2019

What's your build setup? As I mentioned, IE11/Edge seems to work fine in our examples

@hwatersiv
Copy link
Author

hwatersiv commented Aug 20, 2019

Unfortunately, I was not able to replicate with your demo code either but the issue still remains in my code base. The usage might be form the using the API. something like this:

import { injectIntl, WrappedComponentProps as InjectedIntlProps } from "react-intl";

interface IMyComponenrProps extends InjectedIntlProps {}

class MyComponentClass extends PureComponent<IMyComponenrProps, IMyComponentState> {
const monthName = this.props.intl.formatDate(new Date(), { "month": "long" })
     public render() {
          <div>{monthName}</div>
     }
}

const MyComponentWithIntl = InjectIntl(MyComponentClass)
export const MyComponent = connect(mapStateToProps, mapDispatchToProps)(MyComponentWithIntl );

@longlho
Copy link
Member

longlho commented Aug 20, 2019

what's ur build setup (webpack/rollup config...)?

@hwatersiv
Copy link
Author

We are using parcel.js out of the box

@longlho
Copy link
Member

longlho commented Aug 20, 2019

our demo also uses parcel out of the box :(

@longlho
Copy link
Member

longlho commented Aug 20, 2019

do u have custom babel config or something?

@hwatersiv
Copy link
Author

ts.config:

{
  "compilerOptions": {
    "allowJs": true,
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    "experimentalDecorators": true,
    "forceConsistentCasingInFileNames": true,
    "jsx": "preserve",
    "isolatedModules": true,
    "lib": [
      "dom",
      "es7"
    ],
    "module": "esnext",
    "moduleResolution": "node",
    "noEmit": true,
    "noFallthroughCasesInSwitch": true,
    "noImplicitAny": true,
    "noImplicitReturns": true,
    "noImplicitThis": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "outDir": "build/dist",
    "resolveJsonModule": true,
    "strict": true,
    "target": "es6",
    "skipLibCheck": false
  },
  "include": [
    "src",
    "types"
  ]
}

@longlho
Copy link
Member

longlho commented Aug 21, 2019

@hwatersiv can u try master?

@longlho longlho reopened this Aug 21, 2019
@malcolmmadsheep
Copy link

@longlho seems like your changes fixed Edge!

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

6 participants