Skip to content

Commit

Permalink
Fix file server crash (denoland#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlomieju authored and ry committed Dec 12, 2018
1 parent dbff420 commit d9ab8eb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions file_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ async function serveDir(req: ServerRequest, dirPath: string, dirName: string) {
for (const info of fileInfos) {
if (info.name === "index.html" && info.isFile()) {
// in case index.html as dir...
await serveFile(req, info.path);
return;
return await serveFile(req, info.path);
}
// Yuck!
let mode = null;
Expand Down

0 comments on commit d9ab8eb

Please sign in to comment.