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

TypeError: Cannot read property 'getCurrentStack' of undefined #71

Open
ubuntugx opened this issue Jun 19, 2020 · 1 comment
Open

TypeError: Cannot read property 'getCurrentStack' of undefined #71

ubuntugx opened this issue Jun 19, 2020 · 1 comment

Comments

@ubuntugx
Copy link

hello, I got the error TypeError: Cannot read property 'getCurrentStack' of undefined when render, Do you know where i use in a wrong way?

export const getResEmailData = (dataArr) => {
  if(!dataArr) return '';
  return renderEmail(<Email title="email">{dataArr && dataArr.map((item, index) => {
    if(Array.isArray(item)){
      return <Item key={index}>{item.map(partOfline => handleEmailItem(partOfline))}</Item>
    }
    return <Item key={index}>{handleEmailItem(item)}</Item>
  }
    )}</Email>)
}
const handleEmailItem = (line) => {
  switch (line.tag) {
    case RICH_CONTENT_TYPE.img:
      return <Image src={line.src} />
    case RICH_CONTENT_TYPE.text:
      return <Span>{line.text}</Span>
    case RICH_CONTENT_TYPE.title:
      return <Span>{`<h${line.level}>${line.text}</h${line.level}>`}</Span>
    case RICH_CONTENT_TYPE.a:
      return <A href={line.href}>{line.text}</A>
    default:
      break;
  }
}
react-dom-server.browser.development.js:2560 Uncaught (in promise) TypeError: Cannot read property 'getCurrentStack' of undefined
    at pushCurrentDebugStack (react-dom-server.browser.development.js:2560)
    at ReactDOMServerRenderer.read (react-dom-server.browser.development.js:3155)
    at Object.renderToStaticMarkup (react-dom-server.browser.development.js:3660)
@nazarbroslavskyi
Copy link

the same issue
image

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

2 participants