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 'getLength' of undefined #1312

Closed
jordanh opened this issue Aug 30, 2017 · 2 comments
Closed

TypeError: Cannot read property 'getLength' of undefined #1312

jordanh opened this issue Aug 30, 2017 · 2 comments
Assignees
Milestone

Comments

@jordanh
Copy link
Contributor

jordanh commented Aug 30, 2017

https://sentry.io/parabol/action-production/issues/339304805/

TypeError: Cannot read property 'getLength' of undefined
  at default (./universal/utils/draftjs/truncateCard.js:38:21)
  at Component (./universal/modules/email/components/Card/Card.js:46:23)
  at _constructComponentWithoutOwner (../node_modules/react-dom/lib/ReactCompositeComponent.js:308)
  at _constructComponent (../node_modules/react-dom/lib/ReactCompositeComponent.js:284)
  at mountComponent (../node_modules/react-dom/lib/ReactCompositeComponent.js:187)
...
(45 additional frame(s) were not displayed)
@jordanh
Copy link
Contributor Author

jordanh commented Aug 30, 2017

Context of bug:

  • @tayamueller and me created a number of cards during our meeting
  • I believe this occurred while ending the meeting

@mattkrick
Copy link
Member

Oh this is really, really good.
Converting a card to plaintext adds in line breaks, so the character count is greater than it would be if you loop through each block & count the characters. the magical thing is that you stumbled upon this with a card with the perfect number of characters where that made a difference.

@ghost ghost added the pr review label Aug 31, 2017
@jordanh jordanh closed this as completed in 432238c Sep 1, 2017
jordanh added a commit that referenced this issue Sep 1, 2017
@ghost ghost removed the pr review label Sep 1, 2017
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