Prefer nothing over empty templates (#15633)

This commit is contained in:
Steve Repsher
2023-02-28 05:02:47 -05:00
committed by GitHub
parent 4031d9cc78
commit 9ce4563dd4
362 changed files with 1533 additions and 1435 deletions

View File

@@ -1,5 +1,5 @@
import { mdiDrag } from "@mdi/js";
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
import { css, CSSResultGroup, html, LitElement, nothing } from "lit";
import { customElement, property } from "lit/decorators";
import { repeat } from "lit/directives/repeat";
import type { SortableEvent } from "sortablejs";
@@ -39,9 +39,9 @@ export class HuiEntityEditor extends LitElement {
return this._entityKeys.get(action)!;
}
protected render(): TemplateResult {
protected render() {
if (!this.entities) {
return html``;
return nothing;
}
return html`