From 7bf9d5bd73d605acedfc67e49048cc512257a063 Mon Sep 17 00:00:00 2001 From: "pouriade.com" Date: Fri, 23 Oct 2026 11:07:48 -0700 Subject: [PATCH] Fix the theme test's type check A token's name came from a regex capture typed as possibly undefined, which a computed key can't take. --- apps/web/tests/styles/theme.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/tests/styles/theme.test.ts b/apps/web/tests/styles/theme.test.ts index c8f29f4..6491fea 100644 --- a/apps/web/tests/styles/theme.test.ts +++ b/apps/web/tests/styles/theme.test.ts @@ -106,7 +106,7 @@ describe('the offline page', () => { function tokensIn(text: string) { return new Map( Array.from(text.matchAll(/^\s*(--[a-z-]+):([^;]+);/gm), (match) => [ - match[1], + match[1] ?? '', match[2]?.replace(/\s+/g, ' ').trim(), ]), ) -- knotmirror 0.0.1