We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0457504 commit dc87bd0Copy full SHA for dc87bd0
src/telemetry.js
@@ -15,8 +15,8 @@ Telemeter.prototype.configure = function(options) {
15
var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;
16
var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));
17
var deleteCount = 0;
18
- if (this.maxQueueSize > newMaxEvents) {
19
- deleteCount = this.maxQueueSize - newMaxEvents;
+ if (this.queue.length > newMaxEvents) {
+ deleteCount = this.queue.length - newMaxEvents;
20
}
21
this.maxQueueSize = newMaxEvents;
22
this.queue.splice(0, deleteCount);
0 commit comments