From a1a48016988d51538aa4fe7c87367d2f1a583ad5 Mon Sep 17 00:00:00 2001 From: Jack Marshall Date: Tue, 11 Feb 2025 11:14:31 +0000 Subject: [PATCH] Fixed improper null checks on number input component properties --- .../Pages/Shared/_NumberInputCell.cshtml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dfe.ManageFreeSchoolProjects/Dfe.ManageFreeSchoolProjects/Pages/Shared/_NumberInputCell.cshtml b/Dfe.ManageFreeSchoolProjects/Dfe.ManageFreeSchoolProjects/Pages/Shared/_NumberInputCell.cshtml index 4fa5d0274..f3dbcf1a4 100644 --- a/Dfe.ManageFreeSchoolProjects/Dfe.ManageFreeSchoolProjects/Pages/Shared/_NumberInputCell.cshtml +++ b/Dfe.ManageFreeSchoolProjects/Dfe.ManageFreeSchoolProjects/Pages/Shared/_NumberInputCell.cshtml @@ -2,16 +2,18 @@ @{ var showError = !string.IsNullOrWhiteSpace(Model.ErrorMessage); + var showSuffix = !string.IsNullOrWhiteSpace(Model.Suffix); + var showLabel = !string.IsNullOrWhiteSpace(Model.Label); } @{ - if(Model.Label.Length > 0) + if (showLabel) {
@Model.Label
} }
@{ - if (Model.Suffix.Length > 0) + if (showSuffix) {