From c2b2b4eba44a7db505a616987aeda0aca82747ce Mon Sep 17 00:00:00 2001 From: Hristo Terezov Date: Mon, 7 Jan 2019 18:55:39 +0000 Subject: [PATCH] fix(initAnalytics): Add catch. --- react/features/analytics/functions.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/react/features/analytics/functions.js b/react/features/analytics/functions.js index ab986fbb5..444f41c01 100644 --- a/react/features/analytics/functions.js +++ b/react/features/analytics/functions.js @@ -91,8 +91,11 @@ export function initAnalytics({ getState }: { getState: Function }) { // Set the handlers last, since this triggers emptying of the cache analytics.setAnalyticsHandlers(handlers); - }, - error => analytics.dispose() && logger.error(error)); + }) + .catch(error => { + analytics.dispose(); + logger.error(error); + }); } /**