mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Guard against empty application credential domain (#17786)
This commit is contained in:
parent
77c08fd00f
commit
5bb8c51d25
@ -80,9 +80,7 @@ export class DialogAddApplicationCredential extends LitElement {
|
|||||||
name: domainToName(this.hass.localize, domain),
|
name: domainToName(this.hass.localize, domain),
|
||||||
}));
|
}));
|
||||||
await this.hass.loadBackendTranslation("application_credentials");
|
await this.hass.loadBackendTranslation("application_credentials");
|
||||||
if (this._domain) {
|
this._updateDescription();
|
||||||
this._updateDescription();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected render() {
|
protected render() {
|
||||||
@ -265,11 +263,15 @@ export class DialogAddApplicationCredential extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async _updateDescription() {
|
private async _updateDescription() {
|
||||||
|
if (!this._domain) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
await this.hass.loadBackendTranslation(
|
await this.hass.loadBackendTranslation(
|
||||||
"application_credentials",
|
"application_credentials",
|
||||||
this._domain
|
this._domain
|
||||||
);
|
);
|
||||||
const info = this._config!.integrations[this._domain!];
|
const info = this._config!.integrations[this._domain];
|
||||||
this._description = this.hass.localize(
|
this._description = this.hass.localize(
|
||||||
`component.${this._domain}.application_credentials.description`,
|
`component.${this._domain}.application_credentials.description`,
|
||||||
info.description_placeholders
|
info.description_placeholders
|
||||||
|
Loading…
x
Reference in New Issue
Block a user