1
mirror of https://github.com/home-assistant/frontend synced 2024-10-03 06:57:32 +02:00

Fix setting view background (#3470)

This commit is contained in:
Paulus Schoutsen 2019-08-09 16:26:33 -07:00 committed by GitHub
parent f10fab7e22
commit 47d6bb69b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,10 +52,11 @@ class HcLovelace extends LitElement {
protected updated(changedProps) {
super.updated(changedProps);
if (changedProps.has("viewPath") || changedProps.has("lovelaceConfig")) {
const index = this._viewIndex;
if (index) {
if (index !== undefined) {
this.shadowRoot!.querySelector("hui-view")!.style.background =
this.lovelaceConfig.views[index].background ||
this.lovelaceConfig.background ||