From 3b525554188a609cb7c83f10adbd87c40b8558b6 Mon Sep 17 00:00:00 2001 From: nkdengineer Date: Thu, 5 Feb 2026 14:49:18 +0700 Subject: [PATCH] fix: Some Categories Not Appearing in New Expensify After Migration --- src/libs/CategoryOptionListUtils.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/CategoryOptionListUtils.ts b/src/libs/CategoryOptionListUtils.ts index 358e7552e77e..595d7ad8b9fa 100644 --- a/src/libs/CategoryOptionListUtils.ts +++ b/src/libs/CategoryOptionListUtils.ts @@ -245,6 +245,7 @@ function sortCategories(categories: Record, localeCompare: Loc ...existedValue, name: category.name, pendingAction: category.pendingAction, + enabled: category.enabled ?? false, }); } @@ -255,12 +256,12 @@ function sortCategories(categories: Record, localeCompare: Loc */ const flatHierarchy = (initialHierarchy: Hierarchy) => Object.values(initialHierarchy).reduce((acc: Category[], category) => { - const {name, pendingAction, ...subcategories} = category; + const {name, pendingAction, enabled, ...subcategories} = category; if (name) { const categoryObject: Category = { name, pendingAction, - enabled: categories[name]?.enabled ?? false, + enabled: enabled ?? false, }; acc.push(categoryObject);