From 1101d5ce069ecf21666ff563b410e8d77776e55b Mon Sep 17 00:00:00 2001 From: Mircea Danila Dumitrescu Date: Fri, 29 Aug 2014 15:32:56 +0100 Subject: [PATCH] Fixing duplicate events --- lib/analytics/event.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/analytics/event.js b/lib/analytics/event.js index 4c76ac1..860067f 100644 --- a/lib/analytics/event.js +++ b/lib/analytics/event.js @@ -36,7 +36,7 @@ exports.putterInit = function (db, options) { return; } eventsToSave = eventsToSave.concat(events); - events=[]; + events.splice(0); } if ((eventsToSave.length > bufferSize) || (new Date().getTime() - bufferTimestamp > 100 && eventsToSave.length > 0)) { insertedDocs = eventsToSave.splice(0, bufferSize);