Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Simplified code

Saúl Ibarra Corretgéeca04de34860
diff --git a/react/features/analytics/functions.js b/react/features/analytics/functions.js
index 5ac7538ecb..5a2d5bc0e7 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');