fix(config)

This commit is contained in:
Adam Bradley
2015-10-05 15:20:47 -05:00
parent 194f3e4aad
commit a53efcdeb4

View File

@ -38,8 +38,9 @@ export class IonicConfig {
this._s.platforms[args[0]] = args[1]; this._s.platforms[args[0]] = args[1];
this._c = {}; // clear cache this._c = {}; // clear cache
break; break;
} }
return this;
} }
/** /**
@ -85,7 +86,6 @@ export class IonicConfig {
// if there was no user config then it'll check each of // if there was no user config then it'll check each of
// the user config's platforms, which already contains // the user config's platforms, which already contains
// settings from default platform configs // settings from default platform configs
this._c[key] = null;
let userPlatformValue = undefined; let userPlatformValue = undefined;
let userDefaultValue = this._s[key]; let userDefaultValue = this._s[key];
@ -104,7 +104,7 @@ export class IonicConfig {
let activePlatformKeys = this._platform.platforms(); let activePlatformKeys = this._platform.platforms();
// loop through all of the active platforms we're on // loop through all of the active platforms we're on
for (let i = 0; i < activePlatformKeys.length; i++) { for (let i = 0, l = activePlatformKeys.length; i < l; i++) {
// get user defined platform values // get user defined platform values
if (this._s.platforms) { if (this._s.platforms) {
@ -139,14 +139,12 @@ export class IonicConfig {
} }
if (this._s.mode) { }
configObj = IonicConfig.getModeConfig(this._s.mode); configObj = IonicConfig.getModeConfig(this._s.mode);
if (configObj && isDefined(configObj[key])) { if (configObj && isDefined(configObj[key])) {
userDefaultModeValue = configObj[key]; userDefaultModeValue = configObj[key];
} }
}
}
// cache the value // cache the value
this._c[key] = isDefined(userPlatformValue) ? userPlatformValue : this._c[key] = isDefined(userPlatformValue) ? userPlatformValue :