Skip to content

Commit a2e2017

Browse files
committed
only require fs.promises
1 parent 307d1de commit a2e2017

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/create-tree.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const fs = require('fs')
1+
const fs = require('fs').promises
22
const path = require('path')
33
const Page = require('./page')
44
const { sortBy } = require('lodash')
@@ -14,7 +14,7 @@ module.exports = async function createTree (originalPath, langObj) {
1414
// Otherwise, assume it's a child .md file and add `.md` to the path.
1515
let filepath
1616
try {
17-
await fs.promises.access(originalPath)
17+
await fs.access(originalPath)
1818
filepath = `${originalPath}/index.md`
1919
} catch {
2020
filepath = `${originalPath}.md`

0 commit comments

Comments
 (0)