Fix has changed for when hass is not changed (#18778)

This commit is contained in:
Bram Kragten 2023-11-29 11:20:04 +01:00 committed by GitHub
parent 3876c67588
commit 867f625b0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,10 @@ export function hasConfigChanged(
return true;
}
if (!changedProps.has("hass")) {
return false;
}
const oldHass = changedProps.get("hass") as HomeAssistant | undefined;
if (!oldHass) {
return true;
@ -69,6 +73,10 @@ export function hasConfigOrEntityChanged(
return true;
}
if (!changedProps.has("hass")) {
return false;
}
const oldHass = changedProps.get("hass") as HomeAssistant;
const newHass = element.hass as HomeAssistant;
@ -87,6 +95,10 @@ export function hasConfigOrEntitiesChanged(
return true;
}
if (!changedProps.has("hass")) {
return false;
}
const oldHass = changedProps.get("hass") as HomeAssistant;
const newHass = element.hass as HomeAssistant;