From 8fbdd88b24820be677f1462f269052f351e81d2b Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 17 May 2020 04:59:50 -0500 Subject: [PATCH] Cleanup new ha-config (#5906) Remove changedProps check as its always true. --- src/panels/config/automation/ha-config-automation.ts | 2 +- src/panels/config/scene/ha-config-scene.ts | 2 +- src/panels/config/script/ha-config-script.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/panels/config/automation/ha-config-automation.ts b/src/panels/config/automation/ha-config-automation.ts index c5ff6861f5..8ee8267f0b 100644 --- a/src/panels/config/automation/ha-config-automation.ts +++ b/src/panels/config/automation/ha-config-automation.ts @@ -76,7 +76,7 @@ class HaConfigAutomation extends HassRouterPage { if (this.hass) { if (!pageEl.automations || !changedProps) { pageEl.automations = this._getAutomations(this.hass.states); - } else if (changedProps && changedProps.has("hass")) { + } else if (changedProps.has("hass")) { this._debouncedUpdateAutomations(pageEl); } } diff --git a/src/panels/config/scene/ha-config-scene.ts b/src/panels/config/scene/ha-config-scene.ts index 1849969716..1ac455b676 100644 --- a/src/panels/config/scene/ha-config-scene.ts +++ b/src/panels/config/scene/ha-config-scene.ts @@ -68,7 +68,7 @@ class HaConfigScene extends HassRouterPage { if (this.hass) { if (!pageEl.scenes || !changedProps) { pageEl.scenes = this._getScenes(this.hass.states); - } else if (changedProps && changedProps.has("hass")) { + } else if (changedProps.has("hass")) { this._debouncedUpdateScenes(pageEl); } } diff --git a/src/panels/config/script/ha-config-script.ts b/src/panels/config/script/ha-config-script.ts index 417add088a..0f3ba479bf 100644 --- a/src/panels/config/script/ha-config-script.ts +++ b/src/panels/config/script/ha-config-script.ts @@ -73,7 +73,7 @@ class HaConfigScript extends HassRouterPage { if (this.hass) { if (!pageEl.scripts || !changedProps) { pageEl.scripts = this._getScripts(this.hass.states); - } else if (changedProps && changedProps.has("hass")) { + } else if (changedProps.has("hass")) { this._debouncedUpdateScripts(pageEl); } }