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");
|
this.#currencies[0].deleteButton.classList.add("d-none");
|
||||||
} else {
|
} else {
|
||||||
for (const currency of this.#currencies) {
|
for (const currency of this.#currencies) {
|
||||||
const isAnyEntryMatched = () => {
|
let isAnyEntryMatched = false;
|
||||||
for (const entry of currency.getEntries()) {
|
for (const entry of currency.getEntries()) {
|
||||||
if (entry.isMatched) {
|
if (entry.isMatched) {
|
||||||
return true;
|
isAnyEntryMatched = true;
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
return false;
|
}
|
||||||
};
|
if (isAnyEntryMatched) {
|
||||||
if (isAnyEntryMatched()) {
|
|
||||||
currency.deleteButton.classList.add("d-none");
|
currency.deleteButton.classList.add("d-none");
|
||||||
} else {
|
} else {
|
||||||
currency.deleteButton.classList.remove("d-none");
|
currency.deleteButton.classList.remove("d-none");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user