From e2e0ae4d617eb490c98bf7436c352f1625e4b39d Mon Sep 17 00:00:00 2001 From: Rob Gries Date: Sat, 7 Dec 2024 21:27:43 -0500 Subject: [PATCH] Fix offenses modal when action or severity is null --- src/features/OffenseTable/OffenseTable.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/features/OffenseTable/OffenseTable.jsx b/src/features/OffenseTable/OffenseTable.jsx index 829ade1d..e86b6f74 100644 --- a/src/features/OffenseTable/OffenseTable.jsx +++ b/src/features/OffenseTable/OffenseTable.jsx @@ -30,8 +30,12 @@ function OffenseRow({ offenseRecord, selected, onSelect, dob, warnings }) { {offenseRecord.offense_date} {offenseRecord.description} - {toNormalCaseEachWord(offenseRecord.action)} - {toNormalCaseEachWord(offenseRecord.severity)} + + {offenseRecord.action ? toNormalCaseEachWord(offenseRecord.action) : ''} + + + {offenseRecord.severity ? toNormalCaseEachWord(offenseRecord.severity) : ''} + {warnings.length > 0 && (