diff options
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/activitypub/actor-follow.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/activitypub/actor-follow.ts b/server/models/activitypub/actor-follow.ts index 3373355ef..0a6935083 100644 --- a/server/models/activitypub/actor-follow.ts +++ b/server/models/activitypub/actor-follow.ts | |||
@@ -509,12 +509,12 @@ export class ActorFollowModel extends Model<ActorFollowModel> { | |||
509 | tasks.push(ActorFollowModel.sequelize.query(query, options)) | 509 | tasks.push(ActorFollowModel.sequelize.query(query, options)) |
510 | } | 510 | } |
511 | 511 | ||
512 | const [ followers, [ { total } ] ] = await Promise.all(tasks) | 512 | const [ followers, [ dataTotal ] ] = await Promise.all(tasks) |
513 | const urls: string[] = followers.map(f => f.url) | 513 | const urls: string[] = followers.map(f => f.url) |
514 | 514 | ||
515 | return { | 515 | return { |
516 | data: urls, | 516 | data: urls, |
517 | total: parseInt(total, 10) | 517 | total: dataTotal ? parseInt(dataTotal.total, 10) : 0 |
518 | } | 518 | } |
519 | } | 519 | } |
520 | 520 | ||