Skip to content

Commit aff2eea

Browse files
AyoobfDaStormer
andauthored
Update src/functions/teams/create/handler.ts
Co-authored-by: Eshaan <40336269+DaStormer@users.noreply.github.com>
1 parent 2efca08 commit aff2eea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/functions/teams/create/handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const teamsCreate: ValidatedEventAPIGatewayProxyEvent<typeof schema> = async (ev
4141
}
4242

4343
// Check if user already leads a team
44-
if (authUser.team_info && authUser.team_info.role === 'leader') {
44+
if (authUser.team_info?.role === 'leader') {
4545
return {
4646
statusCode: 400,
4747
body: JSON.stringify({

0 commit comments

Comments
 (0)