chore: fix all @typescript-eslint/no-non-null-assertion warnings (#10635)
Co-authored-by: gitstart-calcom <[email protected]> Co-authored-by: Peer Richelsen <[email protected]> Co-authored-by: Keith Williams <[email protected]>
This commit is contained in:
7 files changed
+9
-5
No files matched your search
@@ -56,7 +56,7 @@ export const listPaginatedHandler = async ({ input }: GetOptions) => {
|
||||
let nextCursor: typeof cursor | undefined = undefined;
|
||||
if (users && users.length > limit) {
|
||||
const nextItem = users.pop();
|
||||
nextCursor = nextItem!.id;
|
||||
nextCursor = nextItem?.id;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -161,12 +161,14 @@ export const createHandler = async ({ input, ctx }: CreateOptions) => {
|
||||
},
|
||||
});
|
||||
|
||||
if (!createOwnerOrg.organizationId) throw Error("User not created");
|
||||
|
||||
await prisma.membership.create({
|
||||
data: {
|
||||
userId: createOwnerOrg.id,
|
||||
role: MembershipRole.OWNER,
|
||||
accepted: true,
|
||||
teamId: createOwnerOrg.organizationId!,
|
||||
teamId: createOwnerOrg.organizationId,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ export const listMembersHandler = async ({ ctx, input }: GetOptions) => {
|
||||
let nextCursor: typeof cursor | undefined = undefined;
|
||||
if (teamMembers && teamMembers.length > limit) {
|
||||
const nextItem = teamMembers.pop();
|
||||
nextCursor = nextItem!.id;
|
||||
nextCursor = nextItem?.id;
|
||||
}
|
||||
|
||||
const members = teamMembers?.map((member) => {
|
||||
|
||||
Reference in new issue
Block a user