Skip to content

Commit

Permalink
fix: check for null and undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
vnugent committed Nov 10, 2024
1 parent d032de1 commit 5bf7103
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/api/mobile/login/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ export async function POST (request: NextRequest): Promise<any> {
}

function isNullOrEmpty (str: string | null | undefined): boolean {
return str?.trim() === ''
return str == null || str?.trim() === ''
}

0 comments on commit 5bf7103

Please sign in to comment.