Skip to content

Commit

Permalink
test(gatsby-plugin-mdx): Fix final lint error?
Browse files Browse the repository at this point in the history
  • Loading branch information
illogic-al committed Mar 4, 2022
1 parent fac927e commit 1ac268a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/gatsby-plugin-mdx/gatsby/on-create-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async function onCreateNode(api, pluginOptions) {
)
} else {
try {
fileImports.length > 0 &&
if (fileImports.length > 0) {
fileImports.forEach((item, index) => {
const namedImport = namedImports[index].trim()
fixedContent = fixedContent
Expand All @@ -88,6 +88,7 @@ async function onCreateNode(api, pluginOptions) {
`src={${namedImport}_${importId}}`
)
})
}
} catch (err) {
api.reporter.error(
`Error when creating namespaced imports in gatsby-plugin-mdx`
Expand Down

0 comments on commit 1ac268a

Please sign in to comment.