mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-09 10:59:50 +00:00
Prefer nothing over empty templates (#15633)
This commit is contained in:
@@ -4,7 +4,7 @@ import {
|
||||
html,
|
||||
LitElement,
|
||||
PropertyValues,
|
||||
TemplateResult,
|
||||
nothing,
|
||||
} from "lit";
|
||||
import { customElement, property, state } from "lit/decorators";
|
||||
import { classMap } from "lit/directives/class-map";
|
||||
@@ -50,9 +50,9 @@ class HuiWeatherEntityRow extends LitElement implements LovelaceRow {
|
||||
return hasConfigOrEntityChanged(this, changedProps);
|
||||
}
|
||||
|
||||
protected render(): TemplateResult {
|
||||
protected render() {
|
||||
if (!this.hass || !this._config) {
|
||||
return html``;
|
||||
return nothing;
|
||||
}
|
||||
|
||||
const stateObj = this.hass.states[this._config.entity] as WeatherEntity;
|
||||
|
||||
Reference in New Issue
Block a user