Guard for trace component not loaded (#8838)

This commit is contained in:
Bram Kragten 2021-04-07 12:21:19 +02:00 committed by GitHub
parent 9d6e07ff96
commit 2aac8c55e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,6 +29,7 @@ import "../../layouts/ha-app-layout";
import { haStyle } from "../../resources/styles";
import { HomeAssistant } from "../../types";
import "./ha-logbook";
import { isComponentLoaded } from "../../common/config/is_component_loaded";
@customElement("ha-panel-logbook")
export class HaPanelLogbook extends LitElement {
@ -267,7 +268,7 @@ export class HaPanelLogbook extends LitElement {
this._endDate.toISOString(),
this._entityId
),
loadTraceContexts(this.hass),
isComponentLoaded(this.hass, "trace") ? loadTraceContexts(this.hass) : {},
this._fetchUserDone,
]);