mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Fix context provider not updated on initializing of hass object (#16159)
This commit is contained in:
parent
b15b0e25d6
commit
e781be885d
@ -82,6 +82,15 @@ export const contextMixin = <T extends Constructor<HassBaseEl>>(
|
||||
}),
|
||||
};
|
||||
|
||||
protected hassConnected() {
|
||||
super.hassConnected();
|
||||
for (const [key, value] of Object.entries(this.hass!)) {
|
||||
if (key in this.__contextProviders) {
|
||||
this.__contextProviders[key]!.setValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected _updateHass(obj: Partial<HomeAssistant>) {
|
||||
super._updateHass(obj);
|
||||
for (const [key, value] of Object.entries(obj)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user