« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/write/build-modes/live-dev-server.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/write/build-modes/live-dev-server.js b/src/write/build-modes/live-dev-server.js
index 91ed4ee3..cb878337 100644
--- a/src/write/build-modes/live-dev-server.js
+++ b/src/write/build-modes/live-dev-server.js
@@ -302,10 +302,10 @@ export async function go({
       try {
         const {size} = await stat(filePath);
         const buffer = await readFile(filePath)
-        response.writeHead(200, contentType ? {
-          'Content-Type': contentType,
+        response.writeHead(200, {
+          ...contentType ? {'Content-Type': contentType} : {},
           'Content-Length': size,
-        } : {});
+        });
         response.end(buffer);
         if (loudResponses) console.log(`${requestHead} [200] ${pathname}`);
       } catch (error) {