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

View File

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