diff options
author | Alan Pearce | 2023-09-13 07:02:32 +0200 |
---|---|---|
committer | Alan Pearce | 2023-09-13 07:02:32 +0200 |
commit | 8e7a851d2d5372f6f36afec731bef2af5d6ee602 (patch) | |
tree | 7e2350c5d52e40ff3e6d475142f7370efcb8dff0 | |
parent | c48a92fdd4d9ab9ec96c1cff73af84b9cdd1a96d (diff) | |
download | homestead-8e7a851d2d5372f6f36afec731bef2af5d6ee602.tar.lz homestead-8e7a851d2d5372f6f36afec731bef2af5d6ee602.tar.zst homestead-8e7a851d2d5372f6f36afec731bef2af5d6ee602.zip |
Inline variable
-rw-r--r-- | src/index.ts | 8 |
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 }); } } |