From 2aac8c55e7773502d73c08da8333f7d6baf05528 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 7 Apr 2021 12:21:19 +0200 Subject: [PATCH] Guard for trace component not loaded (#8838) --- src/panels/logbook/ha-panel-logbook.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/panels/logbook/ha-panel-logbook.ts b/src/panels/logbook/ha-panel-logbook.ts index dbf47cc521..d8278a5877 100644 --- a/src/panels/logbook/ha-panel-logbook.ts +++ b/src/panels/logbook/ha-panel-logbook.ts @@ -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, ]);