From 0ec2eebd77ea951b3467b86c20b9bcddc322d6b0 Mon Sep 17 00:00:00 2001 From: Matteo Boschi Date: Tue, 24 Nov 2020 12:56:31 +0100 Subject: [PATCH] [#175718879] refinement --- ts/components/ContextualHelpModal.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/ts/components/ContextualHelpModal.tsx b/ts/components/ContextualHelpModal.tsx index 8887dcfb284..34e4d1dadba 100644 --- a/ts/components/ContextualHelpModal.tsx +++ b/ts/components/ContextualHelpModal.tsx @@ -119,6 +119,7 @@ const ContextualHelpModal: React.FunctionComponent = (props: Props) => { const faqs = fromNullable(data.faqs) // ensure the array is defined and not empty .mapNullable(faqs => (faqs.length > 0 ? faqs : undefined)) + // if remote faqs are not defined or empty, fallback to the local ones .fold(getFAQsFromCategories(props.faqCategories ?? []), fqs => fqs.map(f => ({ title: f.title, content: f.body })) );