Don't send double card updated event when rendering the card (#25883)

This commit is contained in:
Paul Bottein 2025-06-23 14:10:27 +02:00 committed by GitHub
parent 82da36825e
commit c73122d7ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -224,7 +224,9 @@ export class HuiCard extends ReactiveElement {
this._element.preview = this.preview;
// For backwards compatibility
(this._element as any).editMode = this.preview;
if (this.hasUpdated) {
fireEvent(this, "card-updated");
}
} catch (e: any) {
// eslint-disable-next-line no-console
console.error(this.config?.type, e);