web/user: fix MFA enroll dropdown broken when password stage has no configuration flow (#5744)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L 2023-05-24 21:19:19 +02:00 committed by GitHub
parent 7c43c1a05b
commit 1ba734cc7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -75,9 +75,9 @@ export class UserSettingsPage extends AKElement {
}
render(): TemplateResult {
const pwStage = this.userSettings?.filter(
(stage) => stage.component === "ak-user-settings-password",
);
const pwStage =
this.userSettings?.filter((stage) => stage.component === "ak-user-settings-password") ||
[];
return html`<div class="pf-c-page">
<main role="main" class="pf-c-page__main" tabindex="-1">
<ak-tabs ?vertical="${true}">
@ -91,7 +91,7 @@ export class UserSettingsPage extends AKElement {
<ak-user-settings-flow-executor></ak-user-settings-flow-executor>
</div>
<div class="pf-l-stack__item">
${pwStage
${pwStage.length > 0
? html`<ak-user-settings-password
configureUrl=${ifDefined(pwStage[0].configureUrl)}
></ak-user-settings-password>`