Clean helper config entry fetching in settings (#16709)

This commit is contained in:
Paul Bottein 2023-06-01 10:37:34 +02:00 committed by GitHub
parent 03eee9c7d5
commit 0db50d13d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,6 +55,7 @@ export class EntityRegistrySettings extends SubscribeMixin(LitElement) {
}
private async _fetchHelperConfigEntry() {
this._helperConfigEntry = undefined;
if (!this.entry?.config_entry_id) {
return;
}
@ -68,12 +69,9 @@ export class EntityRegistrySettings extends SubscribeMixin(LitElement) {
);
if (manifest.integration_type === "helper") {
this._helperConfigEntry = configEntry;
} else {
this._helperConfigEntry = undefined;
}
} catch (err) {
this._helperConfigEntry = undefined;
}
// eslint-disable-next-line no-empty
} catch (err) {}
}
protected render() {