Skip to content

Commit

Permalink
Merge pull request #650 from DFE-Digital/hotfix-contacts-null-ref
Browse files Browse the repository at this point in the history
Hotfix for when contact models are null
  • Loading branch information
dneed-nimble authored Dec 3, 2024
2 parents c72ee73 + 1bf3056 commit 17c89ea
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<dt class="govuk-summary-list__key">
Name
</dt>
@if (!string.IsNullOrWhiteSpace(Model.FullName))
@if (Model != null && !string.IsNullOrWhiteSpace(Model.FullName))
{
<dd class="govuk-summary-list__value" data-testid="contact-name">@Model.FullName</dd>
}
Expand All @@ -19,7 +19,7 @@
<dt class="govuk-summary-list__key">
Email address
</dt>
@if (!string.IsNullOrWhiteSpace(Model.Email))
@if (Model != null && !string.IsNullOrWhiteSpace(Model.Email))
{
<dd class="govuk-summary-list__value">
<a class="govuk-link" href="mailto:@Model.Email" rel="noopener" target="_blank" data-testid="contact-email">@Model.Email</a>
Expand Down

0 comments on commit 17c89ea

Please sign in to comment.