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]