chore: remove stale workaround in collect() (#1078)
The issue in question, https://github.com/denoland/deno_std/issues/1310, has been marked complete. Looks like the underlying issue has been fixed. So this just removes the comment/unnecessary code. --------- Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
This commit is contained in:
co-authored by
Asher Gomez
parent
e0cb693c0f
commit
41a75fe1f5
@@ -249,11 +249,6 @@ export class ServerContext {
|
||||
opts.staticDir ?? "./static",
|
||||
manifest.baseUrl,
|
||||
);
|
||||
// TODO(lucacasonato): remove the extranious Deno.readDir when
|
||||
// https://github.com/denoland/deno_std/issues/1310 is fixed.
|
||||
for await (const _ of Deno.readDir(fromFileUrl(staticFolder))) {
|
||||
// do nothing
|
||||
}
|
||||
const entires = walk(fromFileUrl(staticFolder), {
|
||||
includeFiles: true,
|
||||
includeDirs: false,
|
||||
@@ -284,7 +279,7 @@ export class ServerContext {
|
||||
staticFiles.push(staticFile);
|
||||
}
|
||||
} catch (err) {
|
||||
if (err instanceof Deno.errors.NotFound) {
|
||||
if (err.cause instanceof Deno.errors.NotFound) {
|
||||
// Do nothing.
|
||||
} else {
|
||||
throw err;
|
||||
|
||||
Reference in New Issue
Block a user