Don't make defaultTheme compulsory

This commit is contained in:
RMidhunSuresh 2022-06-06 12:19:48 +05:30
parent a2cbac9e0c
commit 258a604cc6

View file

@ -165,9 +165,9 @@ export class ThemeLoader {
getDefaultTheme(): string | undefined { getDefaultTheme(): string | undefined {
switch (this.preferredColorScheme) { switch (this.preferredColorScheme) {
case ColorSchemePreference.Dark: case ColorSchemePreference.Dark:
return this._platform.config["defaultTheme"].dark; return this._platform.config["defaultTheme"]?.dark;
case ColorSchemePreference.Light: case ColorSchemePreference.Light:
return this._platform.config["defaultTheme"].light; return this._platform.config["defaultTheme"]?.light;
} }
} }