Fix for config undefined (#6102)

This commit is contained in:
Bram Kragten 2020-06-05 06:51:31 +02:00 committed by GitHub
parent 2c5d3f7492
commit 5c1553286a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -22,6 +22,7 @@ export default <T extends Constructor<HassBaseEl>>(superClass: T) =>
const oldHass = changedProperties.get("hass");
if (
!changedProperties.has("hass") ||
!this.hass!.config ||
oldHass?.config?.state === this.hass!.config.state
) {
return;