mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
fix(config): persistConfig
This commit is contained in:
@ -6,7 +6,7 @@ export interface IonicConfig {
|
||||
* Possible values are: `"ios"` or `"md"`.
|
||||
*/
|
||||
mode?: Mode;
|
||||
_persist?: boolean;
|
||||
persistConfig?: boolean;
|
||||
|
||||
isDevice?: boolean;
|
||||
statusbarPadding?: boolean;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user