summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/index.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/index.ts b/src/index.ts
index 69c9b1a..7188e6c 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -74,7 +74,7 @@ async function serveFile(
   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(),