Skip to content

Commit

Permalink
Fix error due to non-existing variations folder
Browse files Browse the repository at this point in the history
  • Loading branch information
carstingaxion committed Oct 5, 2024
1 parent 1c60c65 commit 2d62c27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Empty file removed src/variations/.keep
Empty file.
4 changes: 4 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ function getVariationEntries() {
const variationsDir = path.resolve(process.cwd(), 'src', 'variations');
const entries = {};

if ( ! fs.existsSync(variationsDir) ) {

Check failure on line 16 in webpack.config.js

View workflow job for this annotation

GitHub Actions / JavaScript Coding Standards

Replace `·!·fs.existsSync(variationsDir)·` with `!fs.existsSync(variationsDir)`
return entries;
}

const variationDirs = fs.readdirSync(variationsDir);
for (const variation of variationDirs) {
const variationPath = path.join(variationsDir, variation);
Expand Down

0 comments on commit 2d62c27

Please sign in to comment.