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

Bug when rendering ![][] #524

Closed
anhydrous99 opened this issue Oct 26, 2023 · 1 comment · Fixed by #554
Closed

Bug when rendering ![][] #524

anhydrous99 opened this issue Oct 26, 2023 · 1 comment · Fixed by #554

Comments

@anhydrous99
Copy link

Description

The following line ![][] raises a TypeError exception.

import Markdown from 'markdown-to-jsx'

<Markdown>![][]</Markdown>

Looks like refImage has no fallback for when the reference doesn't exist while refLink does.

Stack Trace -

TypeError: Cannot read properties of undefined (reading 'B')
    at Object.h (http://localhost:3000/main.8352f82ca6938aad7a39.hot-update.js:815:27)
    at http://localhost:3000/main.8352f82ca6938aad7a39.hot-update.js:991:26
    at t (http://localhost:3000/main.8352f82ca6938aad7a39.hot-update.js:1006:14)
    at t (http://localhost:3000/main.8352f82ca6938aad7a39.hot-update.js:1000:21)
    at q (http://localhost:3000/main.8352f82ca6938aad7a39.hot-update.js:539:15)
    at qt (http://localhost:3000/main.8352f82ca6938aad7a39.hot-update.js:1009:14)
    at __WEBPACK_DEFAULT_EXPORT__ (http://localhost:3000/main.8352f82ca6938aad7a39.hot-update.js:1038:58)
    at renderWithHooks (http://localhost:3000/static/js/bundle.js:20018:22)
    at mountIndeterminateComponent (http://localhost:3000/static/js/bundle.js:23304:17)
    at beginWork (http://localhost:3000/static/js/bundle.js:24600:20)

Steps to Reproduce

This can be reproduced in the paygroud.

  1. Open the official playgroud
  2. copy and paste the following code snippet. ![][]

Result -
Screenshot 2023-10-26 at 1 48 27 PM

@anhydrous99
Copy link
Author

Here is my attempt at fixing this: #525.

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

Successfully merging a pull request may close this issue.

1 participant