Skip to content

Commit

Permalink
fix(countdown): Remove countdown init call on all update (#4521)
Browse files Browse the repository at this point in the history
fixing double call on countdown
  • Loading branch information
KilMer56 authored Aug 15, 2024
1 parent 6a42892 commit 8f3b561
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion javascript/commons/FilterButtons.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ liquipedia.filterButtons = {
this.updateFromFilterStates();
this.setLocalStorage();
this.updateDOM();
this.refreshScriptsAfterContentUpdate();
},

updateFromFilterStates: function() {
Expand Down Expand Up @@ -298,6 +297,7 @@ liquipedia.filterButtons = {
} );
if ( isDefault ) {
templateExpansion.element.innerHTML = templateExpansion.cache.default;
this.refreshScriptsAfterContentUpdate();
return;
}
const parameters = templateExpansion.groups.map( ( group ) => {
Expand All @@ -314,6 +314,7 @@ liquipedia.filterButtons = {

if ( wikitext in templateExpansion.cache ) {
templateExpansion.element.innerHTML = templateExpansion.cache[ wikitext ];
this.refreshScriptsAfterContentUpdate();
return;
}

Expand All @@ -333,6 +334,7 @@ liquipedia.filterButtons = {
if ( data.parse?.text?.[ '*' ] ) {
templateExpansion.element.innerHTML = data.parse.text[ '*' ];
templateExpansion.cache[ wikitext ] = data.parse.text[ '*' ];
this.refreshScriptsAfterContentUpdate();
}
} );
} );
Expand Down

0 comments on commit 8f3b561

Please sign in to comment.