Prevent identical double debug log downloads for integration (#14537)

fixes undefined
This commit is contained in:
Philip Allgaier 2022-12-05 14:31:19 +01:00 committed by GitHub
parent 2ed8a4053b
commit f18997c7c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -548,6 +548,9 @@ export class HaIntegrationCard extends LitElement {
}
private async _handleDisableDebugLogging(ev: MouseEvent) {
// Stop propagation since otherwise we end up here twice while we await the log level change
// and trigger two identical debug log downloads.
ev.stopPropagation();
const configEntry = ((ev.target as HTMLElement).closest("ha-card") as any)
.configEntry;
const integration = configEntry.domain;