From 258a604cc6d22fe7fb0c70f34f67d10163417f63 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Mon, 6 Jun 2022 12:19:48 +0530 Subject: [PATCH] Don't make defaultTheme compulsory --- src/platform/web/ThemeLoader.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/web/ThemeLoader.ts b/src/platform/web/ThemeLoader.ts index 94310b80..e278b9a6 100644 --- a/src/platform/web/ThemeLoader.ts +++ b/src/platform/web/ThemeLoader.ts @@ -165,9 +165,9 @@ export class ThemeLoader { getDefaultTheme(): string | undefined { switch (this.preferredColorScheme) { case ColorSchemePreference.Dark: - return this._platform.config["defaultTheme"].dark; + return this._platform.config["defaultTheme"]?.dark; case ColorSchemePreference.Light: - return this._platform.config["defaultTheme"].light; + return this._platform.config["defaultTheme"]?.light; } }