all repos — archive/homestead @ 2c41c45c48761ee8d7bb503c6966edb00b82457d

My future indieweb platform

Fix incorrect file existence check

Alan Pearce
commit

2c41c45c48761ee8d7bb503c6966edb00b82457d

parent

93197c349e19f1e5b1cb5244827eab64aa4ebba4

1 file changed, 1 insertion(+), 1 deletion(-)

jump to
M src/index.tssrc/index.ts
@@ -74,7 +74,7 @@ file: File | undefined,
statusCode: number = 200, extraHeaders: Record<string, string> = {}, ): Promise<Response> { - if (file && file.handle.exists()) { + if (file && (await file.handle.exists())) { return new Response(file.handle, { headers: { "last-modified": file.mtime.toUTCString(),