diff --git a/src/app/features/settings/settings.component.ts b/src/app/features/settings/settings.component.ts index 33e9ccea0..df7d6aaf4 100644 --- a/src/app/features/settings/settings.component.ts +++ b/src/app/features/settings/settings.component.ts @@ -60,8 +60,11 @@ export default class SettingsComponent implements OnInit { submitForm() { this.isSubmitting.set(true); + const { password, ...profile } = this.settingsForm.value; + const update = password ? { ...profile, password } : profile; + this.userService - .update(this.settingsForm.value) + .update(update) .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe({ next: ({ user }) => void this.router.navigate(['/profile/', user.username]),