all repos — archive/homestead @ d4c067d0baff81a308c01ea62a900075b0326b7d

My future indieweb platform

Rename variable
Alan Pearce alan@alanpearce.eu
Tue, 12 Sep 2023 18:33:47 +0200
commit

d4c067d0baff81a308c01ea62a900075b0326b7d

parent

14e6b232704e9358a2df181b2db0858f794f67de

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/index.tssrc/index.ts
@@ -26,14 +26,14 @@ }; 
 let files = new Map<string, File>();
 
-function registerFile(pathname: string, absPath: string, stat: Stats): void {
+function registerFile(pathname: string, filename: string, stat: Stats): void {
   pathname = "/" + (pathname === "." || pathname === "./" ? "" : pathname);
 
   if (files.get(pathname) !== undefined) {
     console.warn("File already registered:", pathname);
   }
   files.set(pathname, {
-    filename: absPath,
+    filename,
     headers:
       pathname === "/404.html"
         ? Object.assign({}, defaultHeaders, { "cache-control": "no-cache" })