From a592191e050e0cee05481d800ccab8ca31d4962d Mon Sep 17 00:00:00 2001 From: Krishna Gupta Date: Sat, 23 Mar 2024 09:02:00 +0530 Subject: [PATCH] minor naming change. Signed-off-by: Krishna Gupta --- src/libs/OptionsListUtils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/OptionsListUtils.ts b/src/libs/OptionsListUtils.ts index c9ec9ae405c2..d40be62bda25 100644 --- a/src/libs/OptionsListUtils.ts +++ b/src/libs/OptionsListUtils.ts @@ -960,11 +960,11 @@ function getCategoryListSections( const enabledCategories = Object.values(sortedCategories).filter((category) => category.enabled); const categorySections: CategoryTreeSection[] = []; - const numberOfCategories = enabledCategories.length; + const numberOfEnabledCategories = enabledCategories.length; let indexOffset = 0; - if (numberOfCategories === 0 && selectedOptions.length > 0) { + if (numberOfEnabledCategories === 0 && selectedOptions.length > 0) { categorySections.push({ // "Selected" section title: '', @@ -1015,7 +1015,7 @@ function getCategoryListSections( const selectedOptionNames = selectedOptions.map((selectedOption) => selectedOption.name); const enabledWithoutSelectedCategories = sortedCategories.filter((category) => category.enabled && !selectedOptionNames.includes(category.name)); - if (numberOfCategories < CONST.CATEGORY_LIST_THRESHOLD) { + if (numberOfEnabledCategories < CONST.CATEGORY_LIST_THRESHOLD) { categorySections.push({ // "All" section when items amount less than the threshold title: '',