refactor(data): remove unnecessary ?? []

Former-commit-id: d84c9ceca6
This commit is contained in:
zkFriendly
2024-02-27 17:01:45 +01:00
parent 8f3d2e5455
commit 1922f64f7c

View File

@@ -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!
}
/**
@@ -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!
}
/**