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];
|
const account = accountsStore.allAccountsMap[accountId];
|
||||||
|
|
||||||
|
if (!account) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!allowHiddenAccount.value && account.hidden) {
|
if (!allowHiddenAccount.value && account.hidden) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,6 +135,10 @@ export function useCategoryFilterSettingPageBase(type?: string, allowCategoryTyp
|
|||||||
|
|
||||||
const category = transactionCategoriesStore.allTransactionCategoriesMap[categoryId];
|
const category = transactionCategoriesStore.allTransactionCategoriesMap[categoryId];
|
||||||
|
|
||||||
|
if (!category) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!isCategoryOrSubCategoriesAllChecked(category, filterCategoryIds.value)) {
|
if (!isCategoryOrSubCategoriesAllChecked(category, filterCategoryIds.value)) {
|
||||||
filteredCategoryIds[categoryId] = true;
|
filteredCategoryIds[categoryId] = true;
|
||||||
isAllSelected = false;
|
isAllSelected = false;
|
||||||
|
|||||||
@@ -98,6 +98,10 @@ export function useTransactionTagFilterSettingPageBase(type?: string) {
|
|||||||
|
|
||||||
const transactionTag = transactionTagsStore.allTransactionTagsMap[transactionTagId];
|
const transactionTag = transactionTagsStore.allTransactionTagsMap[transactionTagId];
|
||||||
|
|
||||||
|
if (!transactionTag) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (filterTagIds.value[transactionTag.id]) {
|
if (filterTagIds.value[transactionTag.id]) {
|
||||||
filteredTagIds[transactionTag.id] = true;
|
filteredTagIds[transactionTag.id] = true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user