Allows the URLProcessor to replace a property even if its type changes.
This commit is contained in:
parent
0e66552a7f
commit
ae793726ca
|
@ -18,9 +18,9 @@ var ConfigUtil = {
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
overrideConfigJSON: function (config, interfaceConfig, newConfig) {
|
overrideConfigJSON: function (config, interfaceConfig, newConfig) {
|
||||||
for (var configRoot in newConfig) {
|
var configRoot, key, value, confObj;
|
||||||
|
for (configRoot in newConfig) {
|
||||||
var confObj = null;
|
confObj = null;
|
||||||
if (configRoot == "config") {
|
if (configRoot == "config") {
|
||||||
confObj = config;
|
confObj = config;
|
||||||
} else if (configRoot == "interfaceConfig") {
|
} else if (configRoot == "interfaceConfig") {
|
||||||
|
@ -29,15 +29,11 @@ var ConfigUtil = {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var key in newConfig[configRoot]) {
|
for (key in newConfig[configRoot]) {
|
||||||
var value = newConfig[configRoot][key];
|
value = newConfig[configRoot][key];
|
||||||
if (confObj[key] && typeof confObj[key] !== typeof value)
|
if (confObj[key] && typeof confObj[key] !== typeof value) {
|
||||||
{
|
console.log("Overriding a " + configRoot +
|
||||||
console.warn(
|
" property with a property of different type.");
|
||||||
"The type of " + key +
|
|
||||||
" is wrong. That parameter won't be updated in: ",
|
|
||||||
confObj);
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
console.info("Overriding " + key + " with: " + value);
|
console.info("Overriding " + key + " with: " + value);
|
||||||
confObj[key] = value;
|
confObj[key] = value;
|
||||||
|
|
Loading…
Reference in New Issue