Skip to content

Commit

Permalink
Update packages/mdx/lib/plugin/recma-jsx-build.js
Browse files Browse the repository at this point in the history
Signed-off-by: Remco Haszing <remcohaszing@gmail.com>
  • Loading branch information
remcohaszing committed Feb 10, 2024
1 parent 220006b commit dbc5164
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions packages/mdx/lib/plugin/recma-jsx-build.js
Expand Up @@ -46,14 +46,9 @@ export function recmaJsxBuild(options) {
// Remove the pragma comment that we injected ourselves as it is no longer
// needed.
if (tree.comments) {
let index = 0
while (index < tree.comments.length) {
if (tree.comments[index].data?._mdxIsPragmaComment) {
tree.comments.splice(index, 1)
} else {
index++
}
}
tree.comments = tree.comments.filter(function (d) {
return !d.data?._mdxIsPragmaComment
})
}

// When compiling to a function body, replace the import that was just
Expand Down

0 comments on commit dbc5164

Please sign in to comment.