fix the filter could not be saved after the filtered accounts, categories and transaction tags were deleted (#185)
This commit is contained in:
@@ -120,6 +120,10 @@ export function useAccountFilterSettingPageBase(type?: string) {
|
||||
|
||||
const account = accountsStore.allAccountsMap[accountId];
|
||||
|
||||
if (!account) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!allowHiddenAccount.value && account.hidden) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -135,6 +135,10 @@ export function useCategoryFilterSettingPageBase(type?: string, allowCategoryTyp
|
||||
|
||||
const category = transactionCategoriesStore.allTransactionCategoriesMap[categoryId];
|
||||
|
||||
if (!category) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isCategoryOrSubCategoriesAllChecked(category, filterCategoryIds.value)) {
|
||||
filteredCategoryIds[categoryId] = true;
|
||||
isAllSelected = false;
|
||||
|
||||
@@ -98,6 +98,10 @@ export function useTransactionTagFilterSettingPageBase(type?: string) {
|
||||
|
||||
const transactionTag = transactionTagsStore.allTransactionTagsMap[transactionTagId];
|
||||
|
||||
if (!transactionTag) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (filterTagIds.value[transactionTag.id]) {
|
||||
filteredTagIds[transactionTag.id] = true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user