Simplified code

This commit is contained in:
Saúl Ibarra Corretgé 2017-09-04 11:35:09 +02:00
parent 18d1572dab
commit eca04de348
1 changed files with 4 additions and 7 deletions

View File

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