diff --git a/src/common/dom/apply_themes_on_element.ts b/src/common/dom/apply_themes_on_element.ts index f994f0d99d..0ac552abdd 100644 --- a/src/common/dom/apply_themes_on_element.ts +++ b/src/common/dom/apply_themes_on_element.ts @@ -105,12 +105,12 @@ const processTheme = ( const keys = {}; for (const key of Object.keys(combinedTheme)) { const prefixedKey = `--${key}`; - const value = combinedTheme[key]!; + const value = String(combinedTheme[key]!); styles[prefixedKey] = value; keys[prefixedKey] = ""; // Try to create a rgb value for this key if it is not a var - if (!value.startsWith("#")) { + if (value.startsWith("#")) { // Can't convert non hex value continue; }