浏览代码

Simplified code

j8
Saúl Ibarra Corretgé 7 年前
父节点
当前提交
eca04de348
共有 1 个文件被更改,包括 4 次插入7 次删除
  1. 4
    7
      react/features/analytics/functions.js

+ 4
- 7
react/features/analytics/functions.js 查看文件

@@ -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');

正在加载...
取消
保存