mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 19:56:42 +00:00
Fix setting view background (#3470)
This commit is contained in:
parent
f10fab7e22
commit
47d6bb69b0
@ -52,10 +52,11 @@ class HcLovelace extends LitElement {
|
|||||||
|
|
||||||
protected updated(changedProps) {
|
protected updated(changedProps) {
|
||||||
super.updated(changedProps);
|
super.updated(changedProps);
|
||||||
|
|
||||||
if (changedProps.has("viewPath") || changedProps.has("lovelaceConfig")) {
|
if (changedProps.has("viewPath") || changedProps.has("lovelaceConfig")) {
|
||||||
const index = this._viewIndex;
|
const index = this._viewIndex;
|
||||||
|
|
||||||
if (index) {
|
if (index !== undefined) {
|
||||||
this.shadowRoot!.querySelector("hui-view")!.style.background =
|
this.shadowRoot!.querySelector("hui-view")!.style.background =
|
||||||
this.lovelaceConfig.views[index].background ||
|
this.lovelaceConfig.views[index].background ||
|
||||||
this.lovelaceConfig.background ||
|
this.lovelaceConfig.background ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user