markdown-to-jsx icon indicating copy to clipboard operation
markdown-to-jsx copied to clipboard

Passing null value crashes the component

Open wojtekmaj opened this issue 3 years ago • 0 comments

Passing null as children crashes the component.

Cannot read property 'replace' of null

Looks like it's this bit that's crashing:

https://github.com/probablyup/markdown-to-jsx/blob/6afc77c9cea2c2ef53f7bf2b85e7cf5e41f42136/index.tsx#L682-L684

https://github.com/probablyup/markdown-to-jsx/blob/6afc77c9cea2c2ef53f7bf2b85e7cf5e41f42136/index.tsx#L571-L576

https://codesandbox.io/s/markdown-to-jsx-crash-on-null-1t3lh

wojtekmaj avatar May 12 '21 10:05 wojtekmaj