Skip to content

Commit

Permalink
clear new object so we don't waste cycles between refreshes
Browse files Browse the repository at this point in the history
  • Loading branch information
sdetweil committed Nov 12, 2024
1 parent 7e6fb18 commit c69ac71
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/default/compliments/compliments.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ Module.register("compliments", {
if(JSON.stringify(this.config.compliments)!== JSON.stringify(this.compliments_new)){
// only reset if the contents changes
this.config.compliments = this.compliments_new
// clear new file list so we don't waste cycles comparing between refreshes
this.compliments_new = null
// reset the index
this.lastIndexUsed = -1;
}
Expand Down

0 comments on commit c69ac71

Please sign in to comment.