mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-31 13:07:49 +00:00
Do safety check before detecting hex value and handle YAML numbers better (#6956)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
e465ec8835
commit
709112c498
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user