chore(analytics) remove lagacy backwards compatibility code

This commit is contained in:
Saúl Ibarra Corretgé 2022-07-12 16:48:27 +02:00 committed by Saúl Ibarra Corretgé
parent 2ae4ba3875
commit 57f27b4234
1 changed files with 1 additions and 9 deletions

View File

@ -61,7 +61,6 @@ export function resetAnalytics() {
*/
export async function createHandlers({ getState }: { getState: Function }) {
getJitsiMeetGlobalNS().analyticsHandlers = [];
window.analyticsHandlers = []; // Legacy support.
if (!isAnalyticsEnabled(getState)) {
// Avoid all analytics processing if there are no handlers, since no event would be sent.
@ -258,16 +257,9 @@ 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
const analyticsHandlers = [
...getJitsiMeetGlobalNS().analyticsHandlers,
...window.analyticsHandlers
];
const handlers = [];
for (const Handler of analyticsHandlers) {
for (const Handler of getJitsiMeetGlobalNS().analyticsHandlers) {
// Catch any error while loading to avoid skipping analytics in case
// of multiple scripts.
try {