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 Jens Langhammer
parent 47d5fc26cc
commit 0deaf25b1f
No known key found for this signature in database

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>`