Skip to content

Commit c220f4c

Browse files
chasemccoyjohno
authored andcommitted
Use a Set for shortcode names (#522)
* Use a Set for shortcode names Fixes #518 * Use a Set for shortcode names
1 parent 452e8eb commit c220f4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/mdx/mdx-hast-to-jsx.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ MDXContent.isMDXComponent = true`
174174
return <div {...props}/>
175175
};
176176
` +
177-
jsxNames
177+
[...new Set(jsxNames)]
178178
.filter(name => !importExportNames.includes(name))
179179
.map(name => {
180180
return `const ${name} = makeShortcode("${name}");`

0 commit comments

Comments
 (0)