From 8e7a851d2d5372f6f36afec731bef2af5d6ee602 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 13 Sep 2023 07:02:32 +0200 Subject: Inline variable --- src/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index 790c856..b6d0713 100644 --- a/src/index.ts +++ b/src/index.ts @@ -86,10 +86,10 @@ export default withHtmlLiveReload({ 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 }); } } -- cgit 1.4.1