web/flows: fix display error when using IdentificationStage without input fields

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-09-04 13:06:37 +02:00
parent 70d1e3a0cb
commit f725009530
1 changed files with 1 additions and 1 deletions

View File

@ -176,7 +176,7 @@ export class IdentificationStage extends BaseStage<
renderInput(): TemplateResult { renderInput(): TemplateResult {
let type = "text"; let type = "text";
if (!this.challenge?.userFields) { if (!this.challenge?.userFields || this.challenge.userFields.length === 0) {
return html`<p>${t`Select one of the sources below to login.`}</p>`; return html`<p>${t`Select one of the sources below to login.`}</p>`;
} }
const fields = (this.challenge?.userFields || []).sort(); const fields = (this.challenge?.userFields || []).sort();