fix: 修复社区帖子空数组处理

This commit is contained in:
zetaloop
2026-04-25 02:23:05 +08:00
parent dc57a61688
commit 0dc74b5035
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ import (
func toTextArray(s []string) types.TextArray {
if len(s) == 0 {
return types.TextArray{Valid: true}
return types.TextArray{Elements: []string{}, Valid: true}
}
return types.TextArray{
Elements: s,