fix(knowledge): initialize contentMap to prevent nil map panic (#422)

This commit is contained in:
zandwang
2025-08-01 10:07:37 +08:00
committed by GitHub
parent 367bdbec83
commit 3ef9ab619b

View File

@@ -187,7 +187,7 @@ func (s *Slice) GetSliceContent() string {
continue
}
if item.Type == SliceContentTypeTable {
var contentMap map[string]string
contentMap := make(map[string]string)
for _, column := range s.RawContent[0].Table.Columns {
contentMap[column.ColumnName] = column.GetStringValue()
}