From ebfbc79eebcb19f081bc21211f90ad0df1de95ec Mon Sep 17 00:00:00 2001 From: Fitsum Abebe Date: Fri, 17 Nov 2023 21:18:19 +0300 Subject: [PATCH] removed optional chaining --- src/libs/OptionsListUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index c793f3b43567..17a21e003afb 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -897,7 +897,7 @@ function getCategoryListSections(categories, recentlyUsedCategories, selectedOpt function getTagsOptions(tags) { return _.map(tags, (tag) => { // This is to remove unnecessary escaping backslash in tag name sent from backend. - const tagName = tag?.name?.replace(/(\\)+/g, ''); + const tagName = tag.name && tag.name.replace(/(\\)+/g, ''); return { text: tagName,