From 6ee2d023d595340fcf58021e329f510623dae6de Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 17 Dec 2023 13:36:17 -0800 Subject: [PATCH] Fix password change detection on profile edit (#5028) --- .../profile-edit-dialog/profile-edit-dialog.component.spec.ts | 1 - .../profile-edit-dialog/profile-edit-dialog.component.ts | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.spec.ts index 0b300bd74..7dcda57a7 100644 --- a/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.spec.ts @@ -11,7 +11,6 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { NgbAccordionModule, NgbActiveModal, - NgbModal, NgbModalModule, } from '@ng-bootstrap/ng-bootstrap' import { HttpClientModule } from '@angular/common/http' diff --git a/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts b/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts index 19391ce28..d89d49829 100644 --- a/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts +++ b/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts @@ -130,7 +130,8 @@ export class ProfileEditDialogComponent implements OnInit, OnDestroy { } save(): void { - const passwordChanged = this.currentPassword !== this.newPassword + const passwordChanged = + this.newPassword && this.currentPassword !== this.newPassword const profile = Object.assign({}, this.form.value) this.networkActive = true this.profileService