mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-13 04:50:29 +00:00
Prefer nothing over empty templates (#15633)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import "@material/mwc-list/mwc-list-item";
|
||||
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
|
||||
import { css, CSSResultGroup, html, LitElement, nothing } from "lit";
|
||||
import { customElement, property, state } from "lit/decorators";
|
||||
import memoizeOne from "memoize-one";
|
||||
import { fireEvent } from "../../../../src/common/dom/fire_event";
|
||||
@@ -55,9 +55,9 @@ class HassioDatadiskDialog extends LitElement {
|
||||
fireEvent(this, "dialog-closed", { dialog: this.localName });
|
||||
}
|
||||
|
||||
protected render(): TemplateResult {
|
||||
protected render() {
|
||||
if (!this.dialogParams) {
|
||||
return html``;
|
||||
return nothing;
|
||||
}
|
||||
return html`
|
||||
<ha-dialog
|
||||
|
||||
Reference in New Issue
Block a user