From abf2afcb0d9a8e8568956de6c85f91c2484032a0 Mon Sep 17 00:00:00 2001 From: Rolf Heij Date: Mon, 23 Sep 2024 15:19:01 -0400 Subject: [PATCH] Fix edge case where a single empty check is returned by checking service --- .../configure-checks/configure-checks.component.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/extensions/src/platform-scripture/src/checks/configure-checks/configure-checks.component.tsx b/extensions/src/platform-scripture/src/checks/configure-checks/configure-checks.component.tsx index 94d6064871..a63a5076fb 100644 --- a/extensions/src/platform-scripture/src/checks/configure-checks/configure-checks.component.tsx +++ b/extensions/src/platform-scripture/src/checks/configure-checks/configure-checks.component.tsx @@ -98,9 +98,15 @@ export default function ConfigureChecks({ ); }, [activeRanges]); + const noAvailableChecks = useMemo(() => availableChecks.length === 0, [availableChecks]); + const singleEmptyCheck = useMemo( + () => availableChecks.length === 1 && availableChecks[0].checkId === '', + [availableChecks], + ); + return (
- {availableChecks.length === 0 ? ( + {noAvailableChecks || singleEmptyCheck ? (