Skip to content
This repository was archived by the owner on Sep 28, 2021. It is now read-only.

Commit e4e672c

Browse files
author
Pedro Santos
committed
fix: code review changes
1 parent 018d7ca commit e4e672c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/resolver.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const debug = require('debug')
66
const log = debug('jsipfs:http:response:resolver')
77
log.error = debug('jsipfs:http:response:resolver:error')
88
const dirView = require('./dir-view')
9-
const pTryEeach = require('./utils/p-try-each')
9+
const pTryEach = require('./utils/p-try-each')
1010

1111
const INDEX_HTML_FILES = [
1212
'index.html',
@@ -15,7 +15,7 @@ const INDEX_HTML_FILES = [
1515
]
1616

1717
const findIndexFile = (ipfs, path) => {
18-
return pTryEeach(INDEX_HTML_FILES.map(file => {
18+
return pTryEach(INDEX_HTML_FILES.map(file => {
1919
return async () => {
2020
const stats = await ipfs.files.stat(`${path}/${file}`)
2121

@@ -28,6 +28,7 @@ const findIndexFile = (ipfs, path) => {
2828
}
2929

3030
const directory = async (ipfs, path, cid) => {
31+
// Test if it is a Website
3132
try {
3233
const res = await findIndexFile(ipfs, path)
3334

src/utils/p-try-each.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const pTryEeach = async (iterable) => {
3+
const pTryEach = async (iterable) => {
44
let error
55

66
for (const element of iterable) {
@@ -22,4 +22,4 @@ const pTryEeach = async (iterable) => {
2222
throw error
2323
}
2424

25-
module.exports = pTryEeach
25+
module.exports = pTryEach

0 commit comments

Comments
 (0)