React-markdown: Crash with `Uncaught Error: TextRenderer(...): Nothing was returned from render. `

Created on 21 Oct 2020  路  2Comments  路  Source: remarkjs/react-markdown

Hello everyone,
we are using the latest version of react-markdown in combination with the remark-gfm plugin and are experiencing crashes when trying to display a bold list item with a checkbox. It actually happens with any formatted text after the checkbox.
Let me know if this is the right place to raise this issue or if this is rather remark-gfm related.

Your environment

Steps to reproduce

Use the following string in a markdown component.

- [ ] **important task**

Expected behavior

A bold list item with a checkbox is rendered.

Actual behavior

Uncaught Error: TextRenderer(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.
The above error occurred in the <TextRenderer> component:
    in TextRenderer (created by ReactMarkdown)
    in li (created by ListItem)
    in ListItem (created by ReactMarkdown)
    in ul (created by List)
    in List (created by ReactMarkdown)
    in Root (created by ReactMarkdown)
    in ReactMarkdown (at markdown.tsx:13)
鉀碉笍 statureleased 馃悰 typbug 馃懚 semvepatch 馃梽 areinterface

Most helpful comment

I'm able to reproduce the issue in a codesandbox https://codesandbox.io/s/angry-cache-9ep18

All 2 comments

I'm able to reproduce the issue in a codesandbox https://codesandbox.io/s/angry-cache-9ep18

Found it, fixed in the source project that made an empty text node, which doesn鈥檛 make sense; but also here, to handle empty text nodes if they for some reason exist

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dekryptic picture dekryptic  路  3Comments

AlexLerman picture AlexLerman  路  3Comments

ghost picture ghost  路  4Comments

zhenyulin picture zhenyulin  路  3Comments

hiteshpatwari picture hiteshpatwari  路  3Comments