From 8eae461076ddbe310de34f40306795aea086e7cd Mon Sep 17 00:00:00 2001 From: Sean Perkins Date: Tue, 26 Mar 2024 18:29:33 -0400 Subject: [PATCH] fix(core): fallback detection for themes and modes --- core/src/global/ionic-global.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/global/ionic-global.ts b/core/src/global/ionic-global.ts index 371852ea70..ee2ff31ddc 100644 --- a/core/src/global/ionic-global.ts +++ b/core/src/global/ionic-global.ts @@ -227,7 +227,7 @@ export const initialize = (userConfig: IonicConfig = {}) => { * behavior for applications that are not setting the "theme". */ while (elm) { - const theme = (elm as any).theme || elm.getAttribute('theme'); + const theme = elm.getAttribute('theme'); if (theme) { if (isThemeSupported(theme)) { @@ -241,7 +241,7 @@ export const initialize = (userConfig: IonicConfig = {}) => { * If a theme is not detected, then fallback to using the * `mode` attribute to determine the style sheets to use. */ - const elmMode = (elm as any).mode || elm.getAttribute('mode'); + const elmMode = elm.getAttribute('mode'); if (elmMode) { if (isModeSupported(elmMode)) {