Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ workflows:
- LVT-256
- CORE-635
- feat/system-admin
- pm-1464

- deployQa:
context: org-global
Expand Down
4 changes: 2 additions & 2 deletions src/apps/copilots/src/services/members.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export const getMembersByUserIds = async (

const membersFactory = (members: Member[]): FormattedMembers[] => members.map(member => ({
...member,
activeProjects: member.stats.find(item => item.COPILOT.activeProjects)?.COPILOT.activeProjects || 0,
copilotFulfillment: member.stats.find(item => item.COPILOT.fulfillment)?.COPILOT.fulfillment || 0,
activeProjects: member.stats?.find(item => item.COPILOT?.activeProjects)?.COPILOT?.activeProjects || 0,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider checking if member.stats is an array before using find to avoid potential runtime errors if member.stats is not an array.

copilotFulfillment: member.stats?.find(item => item.COPILOT?.fulfillment)?.COPILOT?.fulfillment || 0,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider checking if member.stats is an array before using find to avoid potential runtime errors if member.stats is not an array.

}))

/**
Expand Down