common: timeline items can be null?
This commit is contained in:
@@ -782,10 +782,13 @@ func (gitea *GiteaTransport) GetTimeline(org, repo string, idx int64) ([]*models
|
||||
LogDebug("page:", page, "len:", resCount)
|
||||
page++
|
||||
|
||||
retData = append(retData, res.Payload...)
|
||||
for _, d := range res.Payload {
|
||||
if d != nil {
|
||||
retData = append(retData, d)
|
||||
}
|
||||
}
|
||||
}
|
||||
LogDebug("total results:", len(retData))
|
||||
|
||||
slices.SortFunc(retData, func(a, b *models.TimelineComment) int {
|
||||
return time.Time(b.Created).Compare(time.Time(a.Created))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user