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:
authored and GitHub committed 2023-08-25 14:56:20 +03:00
1 parent 80353d67a0
commit 1e4c20073c
7 files changed
+9 -5

No files matched your search

+1
View File
@@ -57,6 +57,7 @@ export function useTypedQuery<T extends z.AnyZodObject>(schema: T) {
search.set(String(key), String(value));
router.replace(`${pathname}?${search.toString()}`);
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[parsedQuery, router]
);
@@ -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) => {