From b8875630d39ac0f70d2b24f002dc3248c257030b Mon Sep 17 00:00:00 2001 From: Morgan Intrator Date: Tue, 2 Oct 2018 13:23:46 -0400 Subject: [PATCH] Update mdx-ast-to-mdx-hast.js React throws a warning: `Warning: React does not recognize the `metaString` prop on a DOM element.` --- packages/mdx/mdx-ast-to-mdx-hast.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/mdx/mdx-ast-to-mdx-hast.js b/packages/mdx/mdx-ast-to-mdx-hast.js index c7c5b28ea..2b0e8adbb 100644 --- a/packages/mdx/mdx-ast-to-mdx-hast.js +++ b/packages/mdx/mdx-ast-to-mdx-hast.js @@ -30,11 +30,11 @@ module.exports = function mdxAstToMdxHast() { props.className = ['language-' + lang] } - props.metaString = node.lang && node.lang.replace(langRegex, '').trim() + const metaString = node.lang && node.lang.replace(langRegex, '').trim() const meta = - props.metaString && - props.metaString.split(' ').reduce((acc, cur) => { + metaString && + metaString.split(' ').reduce((acc, cur) => { if (cur.split('=').length > 1) { const t = cur.split('=') acc[t[0]] = t[1]