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