mirror of
https://github.com/home-assistant/frontend.git
synced 2026-02-15 07:25:54 +00:00
Fix type error for calendar card (#28869)
This commit is contained in:
@@ -94,10 +94,12 @@ export class HuiCalendarCard extends LitElement implements LovelaceCard {
|
||||
(changedProps.has("_config") && this._config?.entities)
|
||||
) {
|
||||
const computedStyles = getComputedStyle(this);
|
||||
this._calendars = this._config!.entities.map((entity, idx) => ({
|
||||
entity_id: entity,
|
||||
backgroundColor: getColorByIndex(idx, computedStyles),
|
||||
}));
|
||||
if (this._config?.entities) {
|
||||
this._calendars = this._config.entities.map((entity, idx) => ({
|
||||
entity_id: entity,
|
||||
backgroundColor: getColorByIndex(idx, computedStyles),
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user