From 27b09e5b73b95e78dd8c68d3b31fd7b921993f3d Mon Sep 17 00:00:00 2001 From: Dick Choi Date: Thu, 15 Sep 2016 05:50:29 +0900 Subject: [PATCH] fix mixpanel bug --- browser/main/lib/mixpanel.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/browser/main/lib/mixpanel.js b/browser/main/lib/mixpanel.js index 3214c5f8..b3e8fe19 100644 --- a/browser/main/lib/mixpanel.js +++ b/browser/main/lib/mixpanel.js @@ -69,14 +69,14 @@ function _flush () { let events = _fetch() events = events.concat(spliced) localStorage.setItem('events', JSON.stringify(events)) + } else { + _flush() } - console.log('batched ', errs.length) - _flush() }) } } -setInterval(_flush, 1000 * 60 * 10) +setInterval(_flush, 1000 * 60 * 60) function track (name, properties) { properties = Object.assign({}, properties, {