From a795878a9e2964123c4fc55f782ae29a32401760 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Wed, 13 Dec 2017 16:28:51 -0600 Subject: [PATCH] fix(global): add mode and config to Ionic global --- packages/core/src/global/ionic-global.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/src/global/ionic-global.ts b/packages/core/src/global/ionic-global.ts index fa0fbf1c1d..226a181a82 100644 --- a/packages/core/src/global/ionic-global.ts +++ b/packages/core/src/global/ionic-global.ts @@ -14,7 +14,7 @@ if (!Context.dom) { // create the Ionic.config from raw config object (if it exists) // and convert Ionic.config into a ConfigApi that has a get() fn -Context.config = createConfigController( +Ionic.config = Context.config = createConfigController( Ionic.config, detectPlatforms(window.location.href, window.navigator.userAgent, PLATFORM_CONFIGS, 'core') ); @@ -23,7 +23,7 @@ Context.config = createConfigController( // first see if the mode was set as an attribute on // which could have been set by the user, or by prerendering // otherwise get the mode via config settings, and fallback to md -Context.mode = document.documentElement.getAttribute('mode') || Context.config.get('mode', 'md'); +Ionic.mode = Context.mode = document.documentElement.getAttribute('mode') || Context.config.get('mode', 'md'); // ensure we've got the mode attribute set on -document.documentElement.setAttribute('mode', Context.mode); +document.documentElement.setAttribute('mode', Ionic.mode);