Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PRO-2684 committed Apr 12, 2024
1 parent f5d6879 commit c75a331
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions purlfy.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,10 @@ class Purlfy extends EventTarget {
[urlObj, shallContinue] = await this.#applyRule(urlObj, rule, logi);
logi("Purified URL:", urlObj.href);
}
firstRule && this.#statistics.url++; // Increment URL count if a rule was applied
this.#onStatisticsChange();
if (firstRule) { // Increment statistics only if a rule was applied
this.#statistics.url++;
this.#onStatisticsChange();
}
return {
url: urlObj.href,
rule: firstRule ? `${firstRule.description} by ${firstRule.author}` : "N/A"
Expand Down

0 comments on commit c75a331

Please sign in to comment.