Skip to content

Commit

Permalink
fix: not reading categories
Browse files Browse the repository at this point in the history
  • Loading branch information
john-walks-slow committed Mar 21, 2020
1 parent f2b22e9 commit 510d301
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion archive/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let index = {};
const getDirectories = (source) =>
fs
.readdirSync(source, { withFileTypes: true })
.filter((dirent) => dirent.hasOwnProperty('isDirectory') && dirent.isDirectory())
.filter((dirent) => 'isDirectory' in dirent && dirent.isDirectory())
.map((dirent) => dirent.name);
let categories = getDirectories(__dirname);
for (category of categories) {
Expand Down

0 comments on commit 510d301

Please sign in to comment.