From ea9e8cc39231b4aeba2e43e8903ae591be14f993 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 21 Nov 2019 17:03:35 +0100 Subject: [PATCH] iOS 9 doesn't support append (#4260) --- src/components/ha-form/ha-form.ts | 2 +- src/panels/lovelace/hui-root.ts | 4 ++-- src/panels/lovelace/views/hui-panel-view.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/ha-form/ha-form.ts b/src/components/ha-form/ha-form.ts index f62fd311a0..651db6a4ac 100644 --- a/src/components/ha-form/ha-form.ts +++ b/src/components/ha-form/ha-form.ts @@ -175,7 +175,7 @@ export class HaForm extends LitElement implements HaFormElement { if (this._elementContainer!.lastChild) { this._elementContainer!.removeChild(this._elementContainer!.lastChild); } - this._elementContainer!.append(element); + this._elementContainer!.appendChild(element); } else if (this._elementContainer && this._elementContainer.lastChild) { const element = this._elementContainer!.lastChild as HaFormElement; element.schema = this.schema; diff --git a/src/panels/lovelace/hui-root.ts b/src/panels/lovelace/hui-root.ts index 1f71706f7d..ff9368e3af 100644 --- a/src/panels/lovelace/hui-root.ts +++ b/src/panels/lovelace/hui-root.ts @@ -663,7 +663,7 @@ class HUIRoot extends LitElement { this.config.background ); } - root.append(unusedEntities); + root.appendChild(unusedEntities); return; } @@ -698,7 +698,7 @@ class HUIRoot extends LitElement { view.style.setProperty("--lovelace-background", configBackground); } - root.append(view); + root.appendChild(view); } } diff --git a/src/panels/lovelace/views/hui-panel-view.ts b/src/panels/lovelace/views/hui-panel-view.ts index 2b92d68f42..f2e4a85c55 100644 --- a/src/panels/lovelace/views/hui-panel-view.ts +++ b/src/panels/lovelace/views/hui-panel-view.ts @@ -55,7 +55,7 @@ export class HUIPanelView extends UpdatingElement { const card: LovelaceCard = createCardElement(this.config!.cards![0]); card.hass = this.hass; card.isPanel = true; - this.append(card); + this.appendChild(card); } }