Skip to content

Commit

Permalink
[#175718879] refinement
Browse files Browse the repository at this point in the history
  • Loading branch information
Undermaken committed Nov 24, 2020
1 parent 352cb45 commit 0ec2eeb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ts/components/ContextualHelpModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ const ContextualHelpModal: React.FunctionComponent<Props> = (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 }))
);
Expand Down

0 comments on commit 0ec2eeb

Please sign in to comment.