Skip to content

Commit

Permalink
only require fs.promises
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahs committed Apr 9, 2021
1 parent 307d1de commit a2e2017
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/create-tree.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const fs = require('fs')
const fs = require('fs').promises
const path = require('path')
const Page = require('./page')
const { sortBy } = require('lodash')
Expand All @@ -14,7 +14,7 @@ module.exports = async function createTree (originalPath, langObj) {
// Otherwise, assume it's a child .md file and add `.md` to the path.
let filepath
try {
await fs.promises.access(originalPath)
await fs.access(originalPath)
filepath = `${originalPath}/index.md`
} catch {
filepath = `${originalPath}.md`
Expand Down

0 comments on commit a2e2017

Please sign in to comment.