fix month list still displays after all transaction in this month are deleted

This commit is contained in:
MaysWind
2020-12-28 22:11:22 +08:00
parent dc6735dc66
commit e166d1806e
+5 -1
View File
@@ -409,10 +409,14 @@ export default {
} }
for (let j = 0; j < transactionMonthList.items.length; j++) { for (let j = 0; j < transactionMonthList.items.length; j++) {
if (transactionMonthList.items[j].id === transactionMonthList.items.id) { if (transactionMonthList.items[j].id === transaction.id) {
transactionMonthList.items.splice(j, 1); transactionMonthList.items.splice(j, 1);
} }
} }
if (transactionMonthList.items.length < 1) {
self.transactions.splice(i, 1);
}
} }
}); });
}).catch(error => { }).catch(error => {