Skip to content

Commit

Permalink
fix: fixup "chore: changes to migrate to gatsby-plugin-mdx v5"
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenmacdonald committed Jan 16, 2025
1 parent ecb828b commit b4a4bb3
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions www/utils/createPages.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,11 @@ async function createPages(graphql, actions, reporter) {
// Check for a _variables.scss file for this component, e.g. src/Button/_variables.scss.
// If it exists, load the data:
let scssVariablesData = {};
if (node.internal.contentFilePath.endsWith('/README.md')) {
const variablesPath = node.internal.contentFilePath.replace('/README.md', '/_variables.scss');
if (fs.existsSync(variablesPath)) {
// eslint-disable-next-line no-await-in-loop
scssVariablesData = await processComponentSCSSVariables(variablesPath, themesSCSSVariables);
}
const componentDir = path.dirname(node.internal.contentFilePath);
const variablesPath = componentDir + '/_variables.scss';

Check failure on line 60 in www/utils/createPages.js

View workflow job for this annotation

GitHub Actions / tests

Unexpected string concatenation
if (fs.existsSync(variablesPath)) {
// eslint-disable-next-line no-await-in-loop
scssVariablesData = await processComponentSCSSVariables(variablesPath, themesSCSSVariables);
}

createPage({
Expand Down

0 comments on commit b4a4bb3

Please sign in to comment.