fix(config): persistConfig

This commit is contained in:
Manu Mtz.-Almeida
2018-08-11 19:28:46 +02:00
parent 2e7d355edf
commit 1e1964dd77
2 changed files with 4 additions and 3 deletions

View File

@ -6,7 +6,7 @@ export interface IonicConfig {
* Possible values are: `"ios"` or `"md"`.
*/
mode?: Mode;
_persist?: boolean;
persistConfig?: boolean;
isDevice?: boolean;
statusbarPadding?: boolean;

View File

@ -17,12 +17,13 @@ Object.defineProperty(Ionic, 'queue', {
// create the Ionic.config from raw config object (if it exists)
// and convert Ionic.config into a ConfigApi that has a get() fn
const configObj = {
...Ionic['config'],
...configFromSession(),
persistConfig: false,
...Ionic['config'],
...configFromURL()
};
const config = Ionic['config'] = Context['config'] = new Config(configObj);
if (config.getBoolean('_persist', false)) {
if (config.getBoolean('persistConfig')) {
saveConfig(configObj);
}