Skip to content

A desktop coding agent with free access to frontier models.

TypeScript

fix: tidy contrast suggestion helper

ogsamrat79e4519788fd
diff --git a/apps/app/src/app/themes/contrast.ts b/apps/app/src/app/themes/contrast.ts
index f1f61609..09ca8914 100644
--- a/apps/app/src/app/themes/contrast.ts
+++ b/apps/app/src/app/themes/contrast.ts
@@ -222,7 +222,6 @@ export function contrastWarnings(v: ThemeVariant, aaa = false): ContrastWarning[
for (const [token, tokenRows] of byToken) {
const current = readPath(v, token);
const target = Math.max(...tokenRows.map((row) => row.target));
- let backgrounds: string[];
if (token === "accent") {
// Fix the accent fill against its text colour first, then keep it visible as a UI colour.
const accentTextRow = tokenRows.find((row) => row.fg === "accentText");
@@ -239,7 +238,7 @@ export function contrastWarnings(v: ThemeVariant, aaa = false): ContrastWarning[
});
continue;
}
- backgrounds = rows.filter((row) => row.fg === token).map((row) => row.bgColour);
+ const backgrounds = rows.filter((row) => row.fg === token).map((row) => row.bgColour);
const suggestion = suggestColour(current, backgrounds, target);
warnings.push({
token,