diff options
Diffstat (limited to 'src')
-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 }); } } |