Skip to content

Commit

Permalink
fix: add null check for codeScopeAbsPaths (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlengstorf authored and ChristopherBiscardi committed Jun 27, 2019
1 parent 4bafcba commit c59fa5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/gatsby-plugin-mdx/component-with-mdx-scope.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ module.exports = function componentWithMDXScope(
codeScopeAbsPaths = [],
projectRoot = process.cwd()
) {
if (typeof codeScopeAbsPaths === "string") {
codeScopeAbsPaths = [codeScopeAbsPaths];
if (!(codeScopeAbsPaths instanceof Array)) {
codeScopeAbsPaths = [codeScopeAbsPaths].filter(Boolean);
}
const isTS = absWrapperPath.endsWith(".ts");
const isTSX = absWrapperPath.endsWith(".tsx");
Expand Down

0 comments on commit c59fa5b

Please sign in to comment.