fix: correct mode check in ssrRender function

This commit is contained in:
2026-04-14 14:55:13 +08:00
parent d9c9b06722
commit 5ae545d24e

View File

@@ -30,7 +30,7 @@ async function ssrRender(res: http.ServerResponse, mode: 'server' | 'client' = '
res.end('dist/index.html not found'); res.end('dist/index.html not found');
return; return;
} }
if (!mode) { if (mode === 'client' ) {
res.writeHead(200, { 'Content-Type': 'text/html' }); res.writeHead(200, { 'Content-Type': 'text/html' });
res.end(template); res.end(template);
return; return;