mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-12-24 16:10:30 +00:00
[bugfix] fix panic during status delete loop by breaking out early on len(statuses) == 0 (#1317)
Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
This commit is contained in:
parent
67919204af
commit
2bf9bfa24f
1 changed files with 4 additions and 0 deletions
|
@ -157,6 +157,10 @@ func (p *processor) Delete(ctx context.Context, account *gtsmodel.Account, origi
|
|||
break
|
||||
}
|
||||
|
||||
if len(statuses) == 0 {
|
||||
break // reached end
|
||||
}
|
||||
|
||||
for _, status := range statuses {
|
||||
// Ensure account is set
|
||||
status.Account = account
|
||||
|
|
Loading…
Reference in a new issue