Skip to content

Conversation

@hugmanrique
Copy link
Contributor

@hugmanrique hugmanrique commented Dec 1, 2018

@mattdamon108 described the following warning being printed into the browser's console:

index.js:2178 Warning: React does not recognize the `metaString` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `metastring` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
    in code (created by MDXTag)
    in MDXTag (created by Context.Consumer)
    in Unknown (at this-is-the-slug.mdx:17)
    in pre (created by MDXTag)
    in MDXTag (created by Context.Consumer)
    in Unknown (at this-is-the-slug.mdx:17)
    in main (at Layout.js:11)
    in div (at Layout.js:6)
    in Layout (at BlogLayout.js:4)
    in BlogLayout (at this-is-the-slug.mdx:14)
    in div (created by MDXTag)
    in MDXTag (created by Context.Consumer)
    in Unknown (at this-is-the-slug.mdx:12)
    in Unknown (at _app.js:15)
    in Container (at _app.js:14)
    in MyApp

This issue was supposed to have been fixed on #294, but a change on c26a03d#diff-fd729e637d80469ad8fcafd812c97b44 changed the value of props.metastring to node.meta (a value created by mdast), which, by looking at the specification, will be null instead of undefined if no meta string is present after the language.

mdast Code specification

Specific case where code block doesn't have any meta string

I haven't checked the React source, but it is probably complaining because it doesn't know how to convert a null prop into a DOM attribute value.

Unrelated note: I couldn't get the previous commits from the last PR I made to go away, feel free to squash all the commits before merging.

@vercel
Copy link

vercel bot commented Dec 1, 2018

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

@mununki
Copy link

mununki commented Dec 2, 2018

@hugmanrique Thanks for your fix. I await this PR is merged soon.

@johno
Copy link
Member

johno commented Dec 6, 2018

Thank you @hugmanrique!

@johno johno merged commit bed7668 into mdx-js:master Dec 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants