From fa7aa625b4bad6c728e3916ebae7f98fe118b44b Mon Sep 17 00:00:00 2001 From: Sj-Si Date: Mon, 1 Jul 2024 11:46:29 -0400 Subject: [PATCH] fix incorrect variable reference. --- javascript/clusterize.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/javascript/clusterize.js b/javascript/clusterize.js index 822b7d034..66d3aa109 100644 --- a/javascript/clusterize.js +++ b/javascript/clusterize.js @@ -105,7 +105,7 @@ class Clusterize { } async setup() { - if (this.setup_has_run || !this.state.enabled) { + if (this.state.setup_has_run || !this.state.enabled) { return; } @@ -121,11 +121,11 @@ class Clusterize { this.#setupElementObservers(); this.#setupResizeObservers(); - this.setup_has_run = true; + this.state.setup_has_run = true; } clear() { - if (!this.setup_has_run || !this.state.enabled) { + if (!this.state.setup_has_run || !this.state.enabled) { return; } @@ -139,11 +139,11 @@ class Clusterize { this.#html(this.#generateEmptyRow().join("")); - this.setup_has_run = false; + this.state.setup_has_run = false; } async refresh(force) { - if (!this.setup_has_run || !this.state.enabled) { + if (!this.state.setup_has_run || !this.state.enabled) { return; } @@ -165,7 +165,7 @@ class Clusterize { } async update() { - if (!this.setup_has_run || !this.state.enabled) { + if (!this.state.setup_has_run || !this.state.enabled) { return; } @@ -194,7 +194,7 @@ class Clusterize { * * Returns whether the number of max items changed. */ - if (!this.setup_has_run || !this.state.enabled) { + if (!this.state.setup_has_run || !this.state.enabled) { this.config.max_items = max_items; return this.config.max_items !== max_items; } @@ -234,7 +234,7 @@ class Clusterize { } async sortData() { - if (!this.setup_has_run || !this.state.enabled) { + if (!this.state.setup_has_run || !this.state.enabled) { return; } @@ -251,7 +251,7 @@ class Clusterize { } async filterData() { - if (!this.setup_has_run || !this.state.enabled) { + if (!this.state.setup_has_run || !this.state.enabled) { return; }