mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 17:54:30 +08:00
improve robustness
This commit is contained in:
+1
-1
@@ -243,7 +243,7 @@ export function getAllFilteredAccountsBalance(categorizedAccounts, accountFilter
|
|||||||
isLiability: account.isLiability,
|
isLiability: account.isLiability,
|
||||||
currency: account.currency
|
currency: account.currency
|
||||||
});
|
});
|
||||||
} else if (account.type === accountConstants.allAccountTypes.MultiSubAccounts) {
|
} else if (account.type === accountConstants.allAccountTypes.MultiSubAccounts && account.subAccounts) {
|
||||||
for (let subAccountIdx = 0; subAccountIdx < account.subAccounts.length; subAccountIdx++) {
|
for (let subAccountIdx = 0; subAccountIdx < account.subAccounts.length; subAccountIdx++) {
|
||||||
const subAccount = account.subAccounts[subAccountIdx];
|
const subAccount = account.subAccounts[subAccountIdx];
|
||||||
|
|
||||||
|
|||||||
+10
-6
@@ -188,9 +188,11 @@ export const useAccountsStore = defineStore('accounts', {
|
|||||||
if (account.type === accountConstants.allAccountTypes.SingleAccount) {
|
if (account.type === accountConstants.allAccountTypes.SingleAccount) {
|
||||||
allAccounts.push(account);
|
allAccounts.push(account);
|
||||||
} else if (account.type === accountConstants.allAccountTypes.MultiSubAccounts) {
|
} else if (account.type === accountConstants.allAccountTypes.MultiSubAccounts) {
|
||||||
for (let j = 0; j < account.subAccounts.length; j++) {
|
if (account.subAccounts) {
|
||||||
const subAccount = account.subAccounts[j];
|
for (let j = 0; j < account.subAccounts.length; j++) {
|
||||||
allAccounts.push(subAccount);
|
const subAccount = account.subAccounts[j];
|
||||||
|
allAccounts.push(subAccount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -210,9 +212,11 @@ export const useAccountsStore = defineStore('accounts', {
|
|||||||
if (account.type === accountConstants.allAccountTypes.SingleAccount) {
|
if (account.type === accountConstants.allAccountTypes.SingleAccount) {
|
||||||
allVisibleAccounts.push(account);
|
allVisibleAccounts.push(account);
|
||||||
} else if (account.type === accountConstants.allAccountTypes.MultiSubAccounts) {
|
} else if (account.type === accountConstants.allAccountTypes.MultiSubAccounts) {
|
||||||
for (let j = 0; j < account.subAccounts.length; j++) {
|
if (account.subAccounts) {
|
||||||
const subAccount = account.subAccounts[j];
|
for (let j = 0; j < account.subAccounts.length; j++) {
|
||||||
allVisibleAccounts.push(subAccount);
|
const subAccount = account.subAccounts[j];
|
||||||
|
allVisibleAccounts.push(subAccount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user