Inline variable
Alan Pearce alan@alanpearce.eu
Wed, 13 Sep 2023 07:02:32 +0200
1 files changed, 4 insertions(+), 4 deletions(-)
jump to
M src/index.ts → src/index.ts
@@ -86,10 +86,10 @@ fetch: async function (request) { const pathname = new URL(request.url).pathname; const file = files.get(pathname); if (file) { - const ims = parseIfModifiedSinceHeader( - request.headers.get("if-modified-since"), - ); - if (ims >= file?.mtime.getTime()) { + if ( + parseIfModifiedSinceHeader(request.headers.get("if-modified-since")) >= + file?.mtime.getTime() + ) { return new Response("", { status: 304 }); } }