about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorAlan Pearce2023-09-13 07:02:32 +0200
committerAlan Pearce2023-09-13 07:02:32 +0200
commit8e7a851d2d5372f6f36afec731bef2af5d6ee602 (patch)
tree7e2350c5d52e40ff3e6d475142f7370efcb8dff0 /src
parentc48a92fdd4d9ab9ec96c1cff73af84b9cdd1a96d (diff)
downloadhomestead-8e7a851d2d5372f6f36afec731bef2af5d6ee602.tar.lz
homestead-8e7a851d2d5372f6f36afec731bef2af5d6ee602.tar.zst
homestead-8e7a851d2d5372f6f36afec731bef2af5d6ee602.zip
Inline variable
Diffstat (limited to 'src')
-rw-r--r--src/index.ts8
1 files 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 });
       }
     }