Simplified the code in the #resetDeleteCurrencyButtons method of the JavaScript TransactionForm form.
This commit is contained in:
parent
2e5f9ee01f
commit
e1d1aff0c1
@ -159,15 +159,14 @@ class TransactionForm {
|
||||
this.#currencies[0].deleteButton.classList.add("d-none");
|
||||
} else {
|
||||
for (const currency of this.#currencies) {
|
||||
const isAnyEntryMatched = () => {
|
||||
for (const entry of currency.getEntries()) {
|
||||
if (entry.isMatched) {
|
||||
return true;
|
||||
}
|
||||
let isAnyEntryMatched = false;
|
||||
for (const entry of currency.getEntries()) {
|
||||
if (entry.isMatched) {
|
||||
isAnyEntryMatched = true;
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
if (isAnyEntryMatched()) {
|
||||
}
|
||||
if (isAnyEntryMatched) {
|
||||
currency.deleteButton.classList.add("d-none");
|
||||
} else {
|
||||
currency.deleteButton.classList.remove("d-none");
|
||||
|
Loading…
x
Reference in New Issue
Block a user