Просмотр исходного кода

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

Jason Cheatham 2 месяцев назад
Родитель
Сommit
f2fd0f8f00
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      packages/opencode/src/cli/cmd/tui/context/theme.tsx

+ 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]!)