From f3ae37a4090823244f51138bdcf5ca4c7e64daf9 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:52:22 +0800 Subject: [PATCH] Removed the "#selector" attribute from the JavaScript RecurringAccount class. It is only used in the constructor. There is no need to hold a reference to it. --- src/accounting/static/js/option-form.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/accounting/static/js/option-form.js b/src/accounting/static/js/option-form.js index 1ac9ad4..4df693d 100644 --- a/src/accounting/static/js/option-form.js +++ b/src/accounting/static/js/option-form.js @@ -944,12 +944,6 @@ class RecurringAccountSelector { */ class RecurringAccount { - /** - * The account selector for the recurring item editor - * @type {RecurringAccountSelector} - */ - #selector; - /** * The element * @type {HTMLLIElement} @@ -981,13 +975,12 @@ class RecurringAccount { * @param element {HTMLLIElement} the element */ constructor(selector, element) { - this.#selector = selector; this.#element = element; this.code = element.dataset.code; this.text = element.dataset.text; this.#queryValues = JSON.parse(element.dataset.queryValues); - this.#element.onclick = () => this.#selector.editor.saveAccount(this); + this.#element.onclick = () => selector.editor.saveAccount(this); } /**