From ccfbc89047602e492007f95daa8db6bb52d7c4fb Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 20 Apr 2023 16:45:28 +0000 Subject: [PATCH] use Array.map instead of for const of --- packages/backend/src/core/AccountMoveService.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/core/AccountMoveService.ts b/packages/backend/src/core/AccountMoveService.ts index 55874908ee..2b74bc8afc 100644 --- a/packages/backend/src/core/AccountMoveService.ts +++ b/packages/backend/src/core/AccountMoveService.ts @@ -146,10 +146,10 @@ export class AccountMoveService { followerHost: IsNull(), // follower is local followerId: proxy ? Not(proxy.id) : undefined, }); - const followJobs: RelationshipJobData[] = []; - for (const following of followings) { - followJobs.push({ from: { id: following.followerId }, to: { id: dst.id } }); - } + const followJobs = followings.map(following => ({ + from: { id: following.followerId }, + to: { id: dst.id }, + })) as RelationshipJobData[]; // Decrease following count instead of unfollowing. try {