Removed the redundant "entryType" parameter from the static "start" method of JavaScript AccountSelector.

This commit is contained in:
依瑪貓 2023-03-18 18:04:23 +08:00
parent fc766724c4
commit c9453d3023
2 changed files with 3 additions and 4 deletions

View File

@ -234,9 +234,8 @@ class AccountSelector {
* Starts the account selector.
*
* @param entryEditor {JournalEntryEditor} the journal entry editor
* @param entryType {string} the entry type, either "debit" or "credit"
*/
static start(entryEditor, entryType) {
this.#selectors[entryType].#onOpen(entryEditor);
static start(entryEditor) {
this.#selectors[entryEditor.entryType].#onOpen(entryEditor);
}
}

View File

@ -221,7 +221,7 @@ class JournalEntryEditor {
this.#originalEntryControl.onclick = () => OriginalEntrySelector.start(this, this.originalEntryId);
this.#originalEntryDelete.onclick = () => this.clearOriginalEntry();
this.#summaryControl.onclick = () => SummaryEditor.start(this);
this.#accountControl.onclick = () => AccountSelector.start(this, this.entryType);
this.#accountControl.onclick = () => AccountSelector.start(this);
this.#amount.onchange = () => this.#validateAmount();
this.#element.onsubmit = () => {
if (this.#validate()) {