From 77890fc27a404520707a52c7df66432a6ff1e351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 22 Apr 2021 10:56:22 +0200 Subject: [PATCH] fix(config) drop ancient backwards compatibility options --- react/features/base/config/reducer.js | 39 ++------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/react/features/base/config/reducer.js b/react/features/base/config/reducer.js index 329d5d0e4..3df447e7e 100644 --- a/react/features/base/config/reducer.js +++ b/react/features/base/config/reducer.js @@ -2,7 +2,7 @@ import _ from 'lodash'; -import { equals, ReducerRegistry, set } from '../redux'; +import { equals, ReducerRegistry } from '../redux'; import { UPDATE_CONFIG, @@ -187,42 +187,7 @@ function _setConfig(state, { config }) { * supported by jitsi-meet. */ function _translateLegacyConfig(oldValue: Object) { - let newValue = oldValue; - - const oldConfigToNewConfig = { - analytics: [ - [ 'analyticsScriptUrls', 'scriptURLs' ], - [ 'googleAnalyticsTrackingId', 'googleAnalyticsTrackingId' ] - ] - }; - - // Translate the old config properties into the new config properties. - Object.keys(oldConfigToNewConfig).forEach(section => { - if (typeof oldValue[section] !== 'object') { - newValue = set(newValue, section, {}); - } - - for (const [ oldKey, newKey ] of oldConfigToNewConfig[section]) { - if (oldKey in newValue && !(newKey in newValue[section])) { - const v = newValue[oldKey]; - - // Do not modify oldValue. - if (newValue === oldValue) { - newValue = { - ...newValue - }; - } - delete newValue[oldKey]; - - // Do not modify the section because it may be from oldValue - // i.e. do not modify oldValue. - newValue[section] = { - ...newValue[section], - [newKey]: v - }; - } - } - }); + const newValue = oldValue; if (!Array.isArray(oldValue.toolbarButtons) && typeof interfaceConfig === 'object' && Array.isArray(interfaceConfig.TOOLBAR_BUTTONS)) {