From 0dcf2964252f65641a624211431fef85148855bb Mon Sep 17 00:00:00 2001 From: acalcutt Date: Sat, 4 Jan 2025 11:23:35 -0500 Subject: [PATCH] Update serve_font.js --- src/serve_font.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serve_font.js b/src/serve_font.js index 7c38300..4403553 100644 --- a/src/serve_font.js +++ b/src/serve_font.js @@ -35,7 +35,7 @@ export async function serve_font(options, allowedFonts, programOpts) { const sanitizedFontStack = fontStackParts .map((font) => { const fontMatch = font?.match(/^[\w\s-]+$/); - return fontMatch?.[0]; + return fontMatch?.[0] || 'invalid'; }) .filter(Boolean) .join(',');