Removed the "#selector" attribute from the JavaScript JournalEntryAccountOption class. It is only used in the constructor. There is no need to hold a reference to it.

This commit is contained in:
依瑪貓 2023-04-03 14:44:43 +08:00
parent 562bc47be7
commit 202d51a032

View File

@ -190,12 +190,6 @@ class JournalEntryAccountSelector {
*/
class JournalEntryAccountOption {
/**
* The account selector
* @type {JournalEntryAccountSelector}
*/
#selector;
/**
* The element
* @type {HTMLLIElement}
@ -239,7 +233,6 @@ class JournalEntryAccountOption {
* @param element {HTMLLIElement} the element
*/
constructor(selector, element) {
this.#selector = selector;
this.#element = element;
this.code = element.dataset.code;
this.text = element.dataset.text;
@ -247,7 +240,7 @@ class JournalEntryAccountOption {
this.isNeedOffset = element.classList.contains("accounting-account-is-need-offset");
this.#queryValues = JSON.parse(element.dataset.queryValues);
this.#element.onclick = () => this.#selector.lineItemEditor.saveAccount(this);
this.#element.onclick = () => selector.lineItemEditor.saveAccount(this);
}
/**