1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-04-02 00:27:49 +01:00

Stabilize map colors (#30354)

This commit is contained in:
karwosts
2026-03-26 07:47:57 -07:00
committed by Bram Kragten
parent d466ab63bd
commit cb6985eb7c

View File

@@ -424,8 +424,10 @@ class HuiMapCard extends LitElement implements LovelaceCard {
}
const computedStyles = getComputedStyle(this);
color = getColorByIndex(this._colorIndex, computedStyles);
this._colorIndex++;
this._colorDict[entityId] = color;
if (color) {
this._colorIndex++;
this._colorDict[entityId] = color;
}
return color;
}