Skip to content

Commit

Permalink
refactor(data): remove unnecessary ?? []
Browse files Browse the repository at this point in the history
  • Loading branch information
zkfriendly committed Feb 27, 2024
1 parent 9f6c62f commit d84c9ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/data/src/subgraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export default class SemaphoreSubgraph {
*/
async getGroupMembers(groupId: string): Promise<string[]> {
const group = await this.getGroup(groupId, { members: true }) // parameters are checked inside getGroup
return group.members ?? []
return group.members!
}

/**
Expand All @@ -219,7 +219,7 @@ export default class SemaphoreSubgraph {
*/
async getGroupValidatedProofs(groupId: string): Promise<any[]> {
const group = await this.getGroup(groupId, { validatedProofs: true }) // parameters are checked inside getGroup
return group.validatedProofs ?? []
return group.validatedProofs!
}

/**
Expand Down

0 comments on commit d84c9ce

Please sign in to comment.