Skip to content

Commit

Permalink
fix default value of user from taskRequestsList (#2238)
Browse files Browse the repository at this point in the history
* chore:fix default value of user from taskRequestsList

* chore: remove undefined assing to default value
  • Loading branch information
vinit717 authored Oct 28, 2024
1 parent cedce5b commit f8d76e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions utils/task-requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ const transformTaskRequests = async (taskRequestsList: TaskRequestType[]) => {
taskRequestsList.forEach((data) => {
data.users = data.users.map((userData) => {
const user = usersMap.get(userData.userId);
const username = user?.username || 'Undefined';
const firstName = user?.first_name || 'Undefined';
const lastName = user?.last_name || 'Undefined';
const picture = user?.picture || null;
const username = user?.username
const firstName = user?.first_name
const lastName = user?.last_name
const picture = user?.picture;

return { ...userData, username, first_name: firstName, last_name: lastName, picture };
});
Expand Down

0 comments on commit f8d76e1

Please sign in to comment.