code refactor

This commit is contained in:
MaysWind
2025-09-13 15:25:54 +08:00
parent 36d1e01008
commit ba72f421dc
2 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -395,9 +395,9 @@ export function containsAvailableCategory(allTransactionCategories: Record<numbe
for (const [type, categoryType] of entries(allTransactionCategories)) {
if (showHidden) {
result[type] = categoryType.allCategories && categoryType.allCategories.length > 0;
result[parseInt(type)] = categoryType.allCategories && categoryType.allCategories.length > 0;
} else {
result[type] = categoryType.allVisibleCategoryCount > 0;
result[parseInt(type)] = categoryType.allVisibleCategoryCount > 0;
}
}