Skip to content

Commit

Permalink
fix: remove null users in filter (#7308)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew authored Jun 6, 2024
1 parent 7df1321 commit 6b4d9d0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/lib/features/project/project-flag-creators-read-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ export class ProjectFlagCreatorsReadModel
'users.username',
'users.email',
]);
return result.map((row) => ({
id: Number(row.id),
name: String(row.name || row.username || row.email),
}));
return result
.filter((row) => row.name || row.username || row.email)
.map((row) => ({
id: Number(row.id),
name: String(row.name || row.username || row.email),
}));
}
}

0 comments on commit 6b4d9d0

Please sign in to comment.