From 2188f9fa152b1954c05f923c6116dbfb819acebc Mon Sep 17 00:00:00 2001 From: Jannis Baum Date: Sat, 3 Aug 2024 16:58:54 +0200 Subject: [PATCH] fix(#155): make live content accept empty strings --- src/routes/viewer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/viewer.ts b/src/routes/viewer.ts index 1aae6cf3..2ec50964 100644 --- a/src/routes/viewer.ts +++ b/src/routes/viewer.ts @@ -107,7 +107,7 @@ router.post(/.*/, async (req: Request, res: Response) => { content = readFileSync(path).toString(); } const clients = clientsAt(path); - if (content) { + if (content !== undefined) { const rendered = renderTextFile(content, path); liveContent.set(path, rendered); messageClients(clients, `UPDATE: ${rendered}`);