Browse Source

Simplified code

j8
Saúl Ibarra Corretgé 8 years ago
parent
commit
eca04de348
1 changed files with 4 additions and 7 deletions
  1. 4
    7
      react/features/analytics/functions.js

+ 4
- 7
react/features/analytics/functions.js View File

@@ -108,13 +108,10 @@ function _loadHandlers(scriptURLs, handlerConstructorOptions) {
108 108
         // analyticsHandlers is the handlers we want to use
109 109
         // we search for them in the JitsiMeetGlobalNS, but also
110 110
         // check the old location to provide legacy support
111
-        let analyticsHandlers = [];
112
-
113
-        analyticsHandlers = analyticsHandlers.concat(
114
-            getJitsiMeetGlobalNS().analyticsHandlers);
115
-
116
-        // legacy support for old analytics location
117
-        analyticsHandlers = analyticsHandlers.concat(window.analyticsHandlers);
111
+        const analyticsHandlers = [
112
+            ...getJitsiMeetGlobalNS().analyticsHandlers,
113
+            ...window.analyticsHandlers
114
+        ];
118 115
 
119 116
         if (analyticsHandlers.length === 0) {
120 117
             throw new Error('No analytics handlers available');

Loading…
Cancel
Save