mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
fix(config): persistConfig
This commit is contained in:
@ -6,7 +6,7 @@ export interface IonicConfig {
|
|||||||
* Possible values are: `"ios"` or `"md"`.
|
* Possible values are: `"ios"` or `"md"`.
|
||||||
*/
|
*/
|
||||||
mode?: Mode;
|
mode?: Mode;
|
||||||
_persist?: boolean;
|
persistConfig?: boolean;
|
||||||
|
|
||||||
isDevice?: boolean;
|
isDevice?: boolean;
|
||||||
statusbarPadding?: boolean;
|
statusbarPadding?: boolean;
|
||||||
|
@ -17,12 +17,13 @@ Object.defineProperty(Ionic, 'queue', {
|
|||||||
// create the Ionic.config from raw config object (if it exists)
|
// create the Ionic.config from raw config object (if it exists)
|
||||||
// and convert Ionic.config into a ConfigApi that has a get() fn
|
// and convert Ionic.config into a ConfigApi that has a get() fn
|
||||||
const configObj = {
|
const configObj = {
|
||||||
...Ionic['config'],
|
|
||||||
...configFromSession(),
|
...configFromSession(),
|
||||||
|
persistConfig: false,
|
||||||
|
...Ionic['config'],
|
||||||
...configFromURL()
|
...configFromURL()
|
||||||
};
|
};
|
||||||
const config = Ionic['config'] = Context['config'] = new Config(configObj);
|
const config = Ionic['config'] = Context['config'] = new Config(configObj);
|
||||||
if (config.getBoolean('_persist', false)) {
|
if (config.getBoolean('persistConfig')) {
|
||||||
saveConfig(configObj);
|
saveConfig(configObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user