Skip to content

Commit

Permalink
early return if no passport value
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Jan 28, 2025
1 parent f1096bd commit 9bc22e2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions api.planx.uk/modules/send/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import type { Passport } from "../../../types.js";
*/
export function isApplicationTypeSupported(passport: Passport): boolean {
const userApplicationType = passport.data?.["application.type"]?.[0];
if (!userApplicationType) return false;

const statutoryApplicationTypes = getValidSchemaValues("ApplicationType");
const preApplicationType = "preApp";
Expand Down

0 comments on commit 9bc22e2

Please sign in to comment.