From eca04de348609cc603fda9ec4817a69a0ff66270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Mon, 4 Sep 2017 11:35:09 +0200 Subject: [PATCH] Simplified code --- react/features/analytics/functions.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/react/features/analytics/functions.js b/react/features/analytics/functions.js index 5ac7538ec..5a2d5bc0e 100644 --- a/react/features/analytics/functions.js +++ b/react/features/analytics/functions.js @@ -108,13 +108,10 @@ function _loadHandlers(scriptURLs, handlerConstructorOptions) { // analyticsHandlers is the handlers we want to use // we search for them in the JitsiMeetGlobalNS, but also // check the old location to provide legacy support - let analyticsHandlers = []; - - analyticsHandlers = analyticsHandlers.concat( - getJitsiMeetGlobalNS().analyticsHandlers); - - // legacy support for old analytics location - analyticsHandlers = analyticsHandlers.concat(window.analyticsHandlers); + const analyticsHandlers = [ + ...getJitsiMeetGlobalNS().analyticsHandlers, + ...window.analyticsHandlers + ]; if (analyticsHandlers.length === 0) { throw new Error('No analytics handlers available');