Skip to content

Commit

Permalink
fix: Fixed error in type
Browse files Browse the repository at this point in the history
  • Loading branch information
josebui committed Nov 22, 2023
1 parent 6daca3b commit 25d5e8f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/collaboration/membershipsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export type Membership = {

export const extractMembershipsInfo = (
membershipList?: MembershipQuery | null,
): MembershipInfo => ({
): MembershipsInfo => ({
totalCount:
membershipList?.membershipsCount ?? membershipList?.memberships?.totalCount,
pendingCount: membershipList?.pending?.totalCount,
Expand All @@ -75,7 +75,9 @@ export const extractMembership = (
userId: membership.user?.id,
});

export const extractMemberships = (membershipList?: MembershipQuery | null): Membership[] =>
export const extractMemberships = (
membershipList?: MembershipQuery | null,
): Membership[] =>
(
(
membershipList as
Expand All @@ -84,8 +86,7 @@ export const extractMemberships = (membershipList?: MembershipQuery | null): Mem
| null
| undefined
)?.memberships?.edges || []
)
.map(edge => extractMembership(edge.node) as Membership);
).map(edge => extractMembership(edge.node) as Membership);

export const extractAccountMembership = (
membershipList?: AccountCollaborationMembershipFragment | null,
Expand Down

0 comments on commit 25d5e8f

Please sign in to comment.