We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 295c39b commit ed97891Copy full SHA for ed97891
packages/gatsby-plugin-mdx/loaders/mdx-loader.js
@@ -113,11 +113,16 @@ module.exports = async function(content) {
113
114
const source = fileNode && fileNode.sourceInstanceName
115
116
- const mdxNode = await createMDXNode({
117
- id: `fakeNodeIdMDXFileABugIfYouSeeThis`,
118
- node: fileNode,
119
- content,
120
- })
+ let mdxNode
+ try {
+ mdxNode = await createMDXNode({
+ id: `fakeNodeIdMDXFileABugIfYouSeeThis`,
+ node: fileNode,
121
+ content,
122
+ })
123
+ } catch (e) {
124
+ return callback(e)
125
+ }
126
127
// get the default layout for the file source group, or if it doesn't
128
// exist, the overall default layout
0 commit comments