prismicio / prismic-react

React components and hooks to fetch and present Prismic content
https://prismic.io/docs/technologies/homepage-reactjs
Apache License 2.0
154 stars 41 forks source link

Empty Paragraph throws error. #63

Closed yourmediafriend closed 2 years ago

yourmediafriend commented 4 years ago

RichText parser does not like empty paragraphs

{ "type": "paragraph", "text": "", "spans": [] },

TypeError: Cannot read property 'length' of undefined

Could this be ignored rather than an error as we can't guarantee our content staff won't add empty paragraphs.

MarcMcIntosh commented 3 years ago

Hi @yourmediafriend I'm retying to create this issue in a unit test, can you provide more information in the PR above?

angeloashmore commented 2 years ago

Hey @yourmediafriend, I'm cleaning up old issues so I'm going to close this. If this is still an issue, please comment and I can re-open. Thanks!