Skip to content

Commit

Permalink
fix(gatsby-plugin-mdx): pass the correct options to setParserP… (#18243)
Browse files Browse the repository at this point in the history
* pass correct options to setParserPlugins

* ensure plugin.options is not undefined

Co-Authored-By: Michal Piechowiak <misiek.piechowiak@gmail.com>

* chore: format
  • Loading branch information
d4rekanguok authored and pieh committed Oct 8, 2019
1 parent 86a376d commit 8224af5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-mdx/gatsby/source-nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ module.exports = (
debug(`required`, plugin)
if (_.isFunction(requiredPlugin.setParserPlugins)) {
for (let parserPlugin of requiredPlugin.setParserPlugins(
plugin.pluginOptions
plugin.options || {}
)) {
if (_.isArray(parserPlugin)) {
const [parser, parserPluginOptions] = parserPlugin
Expand Down

0 comments on commit 8224af5

Please sign in to comment.