Skip to content

Commit

Permalink
fixed error message
Browse files Browse the repository at this point in the history
  • Loading branch information
schaeferka committed Oct 29, 2024
1 parent 224bdd8 commit 253dce5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ export class MetricsCollector {

if (maxCacheMissWindows !== undefined && this.#cacheMissWindows.size >= maxCacheMissWindows) {
const firstKey = this.#cacheMissWindows.keys().next().value;
this.#cacheMissWindows.delete(firstKey);
if (firstKey !== undefined) {
this.#cacheMissWindows.delete(firstKey);
}
this.#gauges.get(this.#getMetricName(this.#metricNames.cacheMiss))?.remove({ window: firstKey });
}
};
Expand Down

0 comments on commit 253dce5

Please sign in to comment.