From d063735c9669a8bdffeeeabff763d66a80aa5c6c Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 7 Jun 2016 22:07:23 +0100 Subject: [PATCH] Use variable for key name --- src/SdkConfig.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/SdkConfig.js b/src/SdkConfig.js index ca0b7455d8..9eb1baf8c2 100644 --- a/src/SdkConfig.js +++ b/src/SdkConfig.js @@ -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;