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)
|
LogDebug("page:", page, "len:", resCount)
|
||||||
page++
|
page++
|
||||||
|
|
||||||
retData = append(retData, res.Payload...)
|
for _, d := range res.Payload {
|
||||||
|
if d != nil {
|
||||||
|
retData = append(retData, d)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
LogDebug("total results:", len(retData))
|
LogDebug("total results:", len(retData))
|
||||||
|
|
||||||
slices.SortFunc(retData, func(a, b *models.TimelineComment) int {
|
slices.SortFunc(retData, func(a, b *models.TimelineComment) int {
|
||||||
return time.Time(b.Created).Compare(time.Time(a.Created))
|
return time.Time(b.Created).Compare(time.Time(a.Created))
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user