Procházet zdrojové kódy

fix: handle `0` in ANSI theme color definitions (#5009)

Jason Cheatham před 3 měsíci
rodič
revize
f2fd0f8f00

+ 1 - 1
packages/opencode/src/cli/cmd/tui/context/theme.tsx

@@ -161,7 +161,7 @@ function resolveTheme(theme: ThemeJson, mode: "dark" | "light") {
 
       if (c.startsWith("#")) return RGBA.fromHex(c)
 
-      if (defs[c]) {
+      if (defs[c] != null) {
         return resolveColor(defs[c])
       } else if (theme.theme[c as keyof ThemeColors] !== undefined) {
         return resolveColor(theme.theme[c as keyof ThemeColors]!)