web/user: fix ak-user-settings-password getting wrong configureUrl

closes #1733

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-11-04 13:50:26 +01:00
parent b362d2af03
commit 5000c5b061
1 changed files with 6 additions and 7 deletions

View File

@ -90,14 +90,13 @@ export class UserSettingsPage extends LitElement {
<div class="pf-l-stack__item"> <div class="pf-l-stack__item">
${until( ${until(
this.userSettings?.then((settings) => { this.userSettings?.then((settings) => {
if ( const pwStage = settings.filter(
settings.filter( (stage) =>
(stage) => stage.component === "ak-user-settings-password",
stage.component === "ak-user-settings-password", );
).length > 0 if (pwStage.length > 0) {
) {
return html`<ak-user-settings-password return html`<ak-user-settings-password
configureUrl=${ifDefined(settings[0].configureUrl)} configureUrl=${ifDefined(pwStage[0].configureUrl)}
></ak-user-settings-password>`; ></ak-user-settings-password>`;
} }
}), }),