Skip to content

Commit

Permalink
Merge pull request #215 from govuk-one-login/BAU/fix-phone-number-return
Browse files Browse the repository at this point in the history
BAU: We don't want phone number to be returned if it's falsy
  • Loading branch information
CarlyG55 authored Dec 10, 2024
2 parents d9d8213 + b346ce7 commit 61bd7d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/user-info/user-info-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const userInfoController = async (
}

if (validationResult.scopes.includes("phone")) {
userInfo.phone_number = config.getPhoneNumber() ?? undefined;
userInfo.phone_number = config.getPhoneNumber() || undefined;
userInfo.phone_number_verified = config.getPhoneNumberVerified();
}

Expand Down

0 comments on commit 61bd7d8

Please sign in to comment.