From 5fbcec321ee70bbd1beada520334ba19d91e60e9 Mon Sep 17 00:00:00 2001 From: "Ouin, Edouard" Date: Tue, 30 May 2023 18:30:37 +0100 Subject: [PATCH] feat: #87 - update search home page --- .../TutorialsFiltersMenuEntries.utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/webapp/src/webview/components/TutorialsFiltersMenu/TutorialsFiltersMenuEntries/TutorialsFiltersMenuEntries.utils.ts b/packages/webapp/src/webview/components/TutorialsFiltersMenu/TutorialsFiltersMenuEntries/TutorialsFiltersMenuEntries.utils.ts index 7b20a214..65d4f07f 100644 --- a/packages/webapp/src/webview/components/TutorialsFiltersMenu/TutorialsFiltersMenuEntries/TutorialsFiltersMenuEntries.utils.ts +++ b/packages/webapp/src/webview/components/TutorialsFiltersMenu/TutorialsFiltersMenuEntries/TutorialsFiltersMenuEntries.utils.ts @@ -10,7 +10,7 @@ export interface SortedTagListEntry { } export const getAlternativeTitles = (val: string, tags: TutorialsTags): string[] | null => { - if (tags && tags[val]) { + if (tags?.[val]) { return tags[val].tagAlternativeTitles; } else { return null; @@ -18,7 +18,7 @@ export const getAlternativeTitles = (val: string, tags: TutorialsTags): string[] }; export const getTutorialsTag = (val: string, tags: TutorialsTags): string => { - if (tags && tags[val]) { + if (tags?.[val]) { return tags[val].title; } else { return '';