Check for integration before loading logo (#7653)

This commit is contained in:
Joakim Sørensen 2020-11-11 15:16:52 +01:00 committed by GitHub
parent 67814505b3
commit 0cc2d3aaa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -224,12 +224,19 @@ export class HaConfigDevicePage extends LitElement {
` `
: "" : ""
} }
<img ${
src=${brandsUrl(integrations[0], "logo")} integrations.length
referrerpolicy="no-referrer" ? html`
@load=${this._onImageLoad} <img
@error=${this._onImageError} src=${brandsUrl(integrations[0], "logo")}
/> referrerpolicy="no-referrer"
@load=${this._onImageLoad}
@error=${this._onImageError}
/>
`
: ""
}
</div> </div>
</div> </div>
<div class="column"> <div class="column">