Use variable for key name

pull/21833/head
David Baker 2016-06-07 22:07:23 +01:00
parent 33251e6566
commit d063735c96
1 changed files with 3 additions and 2 deletions

View File

@ -26,8 +26,9 @@ class SdkConfig {
static put(cfg) {
var defaultKeys = Object.keys(DEFAULTS);
for (var i = 0; i < defaultKeys.length; ++i) {
if (cfg[defaultKeys[i]] === undefined) {
cfg[defaultKeys[i]] = DEFAULTS[defaultKeys[i]];
var key = defaultKeys[i];
if (cfg[key] === undefined) {
cfg[key] = DEFAULTS[key];
}
}
global.mxReactSdkConfig = cfg;