From eab671d10276f17be8734d7839883682d98c237e Mon Sep 17 00:00:00 2001
From: GyDi <segydi@foxmail.com>
Date: Fri, 1 Apr 2022 01:16:23 +0800
Subject: [PATCH] fix: console warning

---
 src/components/setting/setting-theme.tsx | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/components/setting/setting-theme.tsx b/src/components/setting/setting-theme.tsx
index 106896e..2dc3ec2 100644
--- a/src/components/setting/setting-theme.tsx
+++ b/src/components/setting/setting-theme.tsx
@@ -88,7 +88,7 @@ const SettingTheme = (props: Props) => {
             />
             <TextField
               {...textProps}
-              value={theme.primary_color}
+              value={theme.primary_color ?? ""}
               placeholder={defaultTheme.primary_color}
               onChange={handleChange("primary_color")}
             />
@@ -105,7 +105,7 @@ const SettingTheme = (props: Props) => {
             />
             <TextField
               {...textProps}
-              value={theme.secondary_color}
+              value={theme.secondary_color ?? ""}
               placeholder={defaultTheme.secondary_color}
               onChange={handleChange("secondary_color")}
             />
@@ -121,7 +121,7 @@ const SettingTheme = (props: Props) => {
             />
             <TextField
               {...textProps}
-              value={theme.info_color}
+              value={theme.info_color ?? ""}
               placeholder={defaultTheme.info_color}
               onChange={handleChange("info_color")}
             />
@@ -137,7 +137,7 @@ const SettingTheme = (props: Props) => {
             />
             <TextField
               {...textProps}
-              value={theme.error_color}
+              value={theme.error_color ?? ""}
               placeholder={defaultTheme.error_color}
               onChange={handleChange("error_color")}
             />
@@ -153,7 +153,7 @@ const SettingTheme = (props: Props) => {
             />
             <TextField
               {...textProps}
-              value={theme.warning_color}
+              value={theme.warning_color ?? ""}
               placeholder={defaultTheme.warning_color}
               onChange={handleChange("warning_color")}
             />
@@ -169,7 +169,7 @@ const SettingTheme = (props: Props) => {
             />
             <TextField
               {...textProps}
-              value={theme.success_color}
+              value={theme.success_color ?? ""}
               placeholder={defaultTheme.success_color}
               onChange={handleChange("success_color")}
             />
@@ -180,7 +180,7 @@ const SettingTheme = (props: Props) => {
 
             <TextField
               {...textProps}
-              value={theme.font_family}
+              value={theme.font_family ?? ""}
               onChange={handleChange("font_family")}
             />
           </Item>
@@ -190,7 +190,7 @@ const SettingTheme = (props: Props) => {
 
             <TextField
               {...textProps}
-              value={theme.font_face}
+              value={theme.font_face ?? ""}
               onChange={handleChange("font_face")}
             />
           </Item>
-- 
GitLab