mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Only send auth/current_user if new auth is enabled (#1483)
This commit is contained in:
parent
9634a13dc2
commit
abf85ae19b
@ -333,9 +333,12 @@ class HomeAssistant extends LocalizeMixin(PolymerElement) {
|
||||
);
|
||||
});
|
||||
|
||||
this.hass.callWS({
|
||||
type: 'auth/current_user',
|
||||
}).then(user => this._updateHass({ user }), () => {});
|
||||
// only for new auth
|
||||
if (conn.options.accessToken) {
|
||||
this.hass.callWS({
|
||||
type: 'auth/current_user',
|
||||
}).then(user => this._updateHass({ user }), () => {});
|
||||
}
|
||||
|
||||
conn.subscribeEvents((event) => {
|
||||
this._updateHass({ themes: event.data });
|
||||
|
Loading…
x
Reference in New Issue
Block a user