fix month does not be removed after change last transaction in month

This commit is contained in:
MaysWind
2021-01-11 22:57:46 +08:00
parent 628f9a6149
commit d7efeea24b
+6 -1
View File
@@ -526,7 +526,12 @@ const stores = {
transactionMonthList.items.splice(j, 1, transaction);
}
calculateMonthTotalAmount(state, transactionMonthList, defaultCurrency, state.transactionsFilter.accountId, i >= state.transactions.length - 1 && state.transactionsNextTimeId > 0);
if (transactionMonthList.items.length < 1) {
state.transactions.splice(i, 1);
} else {
calculateMonthTotalAmount(state, transactionMonthList, defaultCurrency, state.transactionsFilter.accountId, i >= state.transactions.length - 1 && state.transactionsNextTimeId > 0);
}
return;
}
}