From: Alec Armbruster <35377827+alectrocute@users.noreply.github.com> Date: Sun, 25 Jun 2023 14:43:58 +0000 (-0400) Subject: fix error on prod X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%7BpictshareAvatarThumbnail%28admin.avatar%29%7D?a=commitdiff_plain;h=d1cf01061bf74978d2dad6c41ac27968baa74f28;p=lemmy-ui.git fix error on prod --- diff --git a/src/server/handlers/theme-handler.ts b/src/server/handlers/theme-handler.ts index b107d85..eb0c8ce 100644 --- a/src/server/handlers/theme-handler.ts +++ b/src/server/handlers/theme-handler.ts @@ -11,8 +11,7 @@ export default async (req: Request, res: Response) => { const theme = req.params.name; if (!theme.endsWith(".css")) { - res.statusCode = 400; - res.send("Theme must be a css file"); + return res.status(400).send("Theme must be a css file"); } const customTheme = path.resolve(extraThemesFolder, theme);