mirror of https://github.com/vector-im/riot-web
Use variable for key name
parent
33251e6566
commit
d063735c96
|
@ -26,8 +26,9 @@ class SdkConfig {
|
||||||
static put(cfg) {
|
static put(cfg) {
|
||||||
var defaultKeys = Object.keys(DEFAULTS);
|
var defaultKeys = Object.keys(DEFAULTS);
|
||||||
for (var i = 0; i < defaultKeys.length; ++i) {
|
for (var i = 0; i < defaultKeys.length; ++i) {
|
||||||
if (cfg[defaultKeys[i]] === undefined) {
|
var key = defaultKeys[i];
|
||||||
cfg[defaultKeys[i]] = DEFAULTS[defaultKeys[i]];
|
if (cfg[key] === undefined) {
|
||||||
|
cfg[key] = DEFAULTS[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
global.mxReactSdkConfig = cfg;
|
global.mxReactSdkConfig = cfg;
|
||||||
|
|
Loading…
Reference in New Issue