From 202d51a0329ecf5930d91dcc6aeff70b45886bb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Mon, 3 Apr 2023 14:44:43 +0800 Subject: [PATCH] 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. --- .../static/js/journal-entry-account-selector.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/accounting/static/js/journal-entry-account-selector.js b/src/accounting/static/js/journal-entry-account-selector.js index e72bf7e..8c59281 100644 --- a/src/accounting/static/js/journal-entry-account-selector.js +++ b/src/accounting/static/js/journal-entry-account-selector.js @@ -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); } /**