Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
protected updated(changedProps): void {
super.updated(changedProps);
if (!this._config || !this.hass) {
return;
}
const oldHass = changedProps.get('hass') as HomeAssistant | undefined;
const oldConfig = changedProps.get('_config') as ListCardConfig | undefined;
if (!oldHass || !oldConfig || oldHass.themes !== this.hass.themes || oldConfig.theme !== this._config.theme) {
applyThemesOnElement(this, this.hass.themes, this._config.theme);
}
}