From 346074c14f2b3efe2d2890b842fcf11cfce54c82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8A=E3=81=95=E3=82=80=E3=81=AE=E3=81=B2=E3=81=A8?= <46447427+samunohito@users.noreply.github.com> Date: Fri, 11 Oct 2024 06:30:10 +0900 Subject: [PATCH] fix --- packages/backend/src/core/RoleService.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/core/RoleService.ts b/packages/backend/src/core/RoleService.ts index be03e5107e..518ea7d490 100644 --- a/packages/backend/src/core/RoleService.ts +++ b/packages/backend/src/core/RoleService.ts @@ -451,9 +451,9 @@ export class RoleService implements OnApplicationShutdown, OnModuleInit { ? await this.roleAssignmentsRepository.findBy({ roleId: In(moderatorRoles.map(r => r.id)) }) : []; - const now = Date.now(); // Setを経由して重複を除去(ユーザIDは重複する可能性があるので) - const result = new Set( + const now = Date.now(); + const resultSet = new Set( assigns .filter(it => (excludeExpire) @@ -471,10 +471,10 @@ export class RoleService implements OnApplicationShutdown, OnModuleInit { .getOneOrFail(); return it.id; }); - result.add(rootUserId); + resultSet.add(rootUserId); } - return [...result].sort((x, y) => x.localeCompare(y)); + return [...resultSet].sort((x, y) => x.localeCompare(y)); } @bindThis