diff --git a/packages/core/src/routes/role.scope.ts b/packages/core/src/routes/role.scope.ts index e522df752..fc93b0763 100644 --- a/packages/core/src/routes/role.scope.ts +++ b/packages/core/src/routes/role.scope.ts @@ -48,7 +48,7 @@ export default function roleScopeRoutes( const resources = await findResourcesByIds(scopes.map(({ resourceId }) => resourceId)); const result: ScopeResponse[] = scopes.map((scope) => { - const resource = resources.find(({ id }) => scope.resourceId); + const resource = resources.find(({ id }) => id === scope.resourceId); assertThat(resource, new Error(`Cannot find resource for id ${scope.resourceId}`));