From d514356030b6ea2915c5285c150f9154fb75d081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Wed, 2 Mar 2022 23:48:43 +0100 Subject: [PATCH] fix: avoid scope issues --- src/lib/services/project-service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/services/project-service.ts b/src/lib/services/project-service.ts index 6ad953a2e8..8281a0fb2e 100644 --- a/src/lib/services/project-service.ts +++ b/src/lib/services/project-service.ts @@ -363,9 +363,9 @@ export default class ProjectService { const role = await this.findProjectRole(projectId, roleId); const usersWithRoles = await this.getUsersWithAccess(projectId); - const user = usersWithRoles.users.find((user) => user.id === userId); + const user = usersWithRoles.users.find((u) => u.id === userId); const currentRole = usersWithRoles.roles.find( - (role) => role.id === user.roleId, + (r) => r.id === user.roleId, ); if (currentRole.id === roleId) {