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

Cannot set properties of undefined (setting 'inTable') #59

Closed
4 tasks done
tujger opened this issue Sep 21, 2023 · 4 comments
Closed
4 tasks done

Cannot set properties of undefined (setting 'inTable') #59

tujger opened this issue Sep 21, 2023 · 4 comments
Labels
👯 no/duplicate Déjà vu 👎 phase/no Post cannot or will not be acted on

Comments

@tujger
Copy link

tujger commented Sep 21, 2023

Initial checklist

Affected packages and versions

remark-gfm 4.0.0

Link to runnable example

No response

Steps to reproduce

With react-markdown

Doing:

<Markdown
  children={`| Type | Count |\n| :- | -: |\n`
      + rows.map(item => `| ${item.join(" | ")} |`).join("\n")}
  />

causes the exception below.
Downgrading to 3.0.1 solves the problem.

Expected behavior

Render the table.

Actual behavior

Uncaught TypeError: Cannot set properties of undefined (setting 'inTable')
    at Object.enterTable (index.js:76:1)
    at compile (index.js:351:1)
    at fromMarkdown (index.js:192:1)
    at parser (index.js:18:1)
    at Function.parse (index.js:262:1)
    at ReactMarkdown (react-markdown.js:104:1)
    at renderWithHooks (react-dom.development.js:14141:1)
    at mountIndeterminateComponent (react-dom.development.js:17432:1)
    at beginWork (react-dom.development.js:18728:1)
    at HTMLUnknownElement.callCallback (react-dom.development.js:3733:1)

Runtime

Node v17

Package manager

npm 8

OS

macOS

Build and bundle tools

Webpack, Create React App

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Sep 21, 2023
@ChristianMurphy
Copy link
Member

Duplicate of #57

@ChristianMurphy ChristianMurphy marked this as a duplicate of #57 Sep 21, 2023
@ChristianMurphy ChristianMurphy closed this as not planned Won't fix, can't repro, duplicate, stale Sep 21, 2023
@github-actions

This comment has been minimized.

@ChristianMurphy
Copy link
Member

Please look at the pinned issue before opening a new one.
To reiterate from the existing issue:

A major version release is rolling out across all: mdx, unified, remark, rehype, and micromark packages.
This includes both type changes (static analysis error) and changes to the parser (potential runtime error) if the major versions are mismatched.

Hold on version 3 of remark-gfm, until the next major of react markdown is released

@ChristianMurphy ChristianMurphy added 👯 no/duplicate Déjà vu 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Sep 21, 2023
@github-actions
Copy link

Hi! Thanks for taking the time to contribute!

Because we treat issues as our backlog, we close duplicates to focus our work and not have to touch the same chunk of code for the same reason multiple times. This is also why we may mark something as duplicate that isn’t an exact duplicate but is closely related.

Thanks,
— bb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👯 no/duplicate Déjà vu 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants