From 27ca61ec85a2bfe11c5d1bc8ea60d9d94a685813 Mon Sep 17 00:00:00 2001 From: Brynley McDonald Date: Fri, 25 Mar 2022 04:31:55 +1300 Subject: [PATCH] Fix issue where theme select does not appear when user's theme is deleted (#12104) --- src/panels/profile/ha-pick-theme-row.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/panels/profile/ha-pick-theme-row.ts b/src/panels/profile/ha-pick-theme-row.ts index b0147b6842..59d9774712 100644 --- a/src/panels/profile/ha-pick-theme-row.ts +++ b/src/panels/profile/ha-pick-theme-row.ts @@ -173,6 +173,9 @@ export class HaPickThemeRow extends LitElement { } private _supportsModeSelection(themeName: string): boolean { + if (!(themeName in this.hass.themes.themes)) { + return false; // User's theme no longer exists + } return "modes" in this.hass.themes.themes[themeName]; }