Ensure required translations are loaded in safe-mode (#10709)

This commit is contained in:
Philip Allgaier 2021-11-29 10:34:25 +01:00 committed by GitHub
parent e7fd75703f
commit 9361e4cf9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,7 @@ class ErrorLogCard extends LitElement {
<ha-icon-button
.path=${mdiRefresh}
@click=${this._refreshErrorLog}
.label=${this.hass!.localize("ui.common.refresh")}
.label=${this.hass.localize("ui.common.refresh")}
></ha-icon-button>
<div class="card-content error-log">${this._errorHTML}</div>
</ha-card>
@ -38,6 +38,7 @@ class ErrorLogCard extends LitElement {
super.firstUpdated(changedProps);
if (this.hass?.config.safe_mode) {
this.hass.loadFragmentTranslation("config");
this._refreshErrorLog();
}
}