Fix for login flow switch (#1609)

* Fix for login flow switch

* Switch flow shall clear step data
This commit is contained in:
Jason Hu 2018-08-29 13:48:32 -07:00 committed by Paulus Schoutsen
parent 31127ccf29
commit f0251d3056
2 changed files with 6 additions and 2 deletions

View File

@ -122,7 +122,8 @@ class HaAuthFlow extends LocalizeLiteMixin(PolymerElement) {
_state: 'step',
};
if (this._step && step.step_id !== this._step.step_id) {
if (this._step &&
(step.flow_id !== this._step.flow_id || step.step_id !== this._step.step_id)) {
props._stepData = {};
}

View File

@ -155,7 +155,10 @@ class HaForm extends EventsMixin(PolymerElement) {
}
_getValue(obj, item) {
return obj[item.name];
if (obj) {
return obj[item.name];
}
return null;
}
_valueChanged(ev) {