Skip to content

Commit

Permalink
Throw a not found res even if --single
Browse files Browse the repository at this point in the history
  • Loading branch information
leo committed Dec 9, 2016
1 parent 1c80706 commit 5c0266c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bin/list
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ const renderDirectory = async dir => {
}

const handler = async (req, res) => {

if (flags.auth) {
const credentials = auth(req)

Expand Down Expand Up @@ -250,7 +249,7 @@ const handler = async (req, res) => {
try {
indexContent = await fs.readFile(indexPath, 'utf8')
} catch (err) {
throw err
return send(res, 404, notFoundResponse)
}

return send(res, 200, indexContent)
Expand Down

0 comments on commit 5c0266c

Please sign in to comment.