Przeglądaj źródła

fix: 修复自定义聊天bug

(cherry picked from commit 8d41c17ccf19cb29100dbe506d3d42a6be822ff9)
1808837298@qq.com 1 rok temu
rodzic
commit
40baa636e4
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      constant/chat.go

+ 1 - 0
constant/chat.go

@@ -21,6 +21,7 @@ var Chats = []map[string]string{
 }
 
 func UpdateChatsByJsonString(jsonString string) error {
+	Chats = make([]map[string]string, 0)
 	return json.Unmarshal([]byte(jsonString), &Chats)
 }