]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix password change detection on profile edit (#5028)
authorshamoon <4887959+shamoon@users.noreply.github.com>
Sun, 17 Dec 2023 21:36:17 +0000 (13:36 -0800)
committerGitHub <noreply@github.com>
Sun, 17 Dec 2023 21:36:17 +0000 (13:36 -0800)
src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.spec.ts
src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts

index 0b300bd74d6b267494e9442bfe2bf40b1756034c..7dcda57a7cd9f5bfc96f941e51aa8cd2e56d142b 100644 (file)
@@ -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'
index 19391ce281ece362e2585de645fc12bed70f4aec..d89d49829aa384fdd826988dfe9188103a028542 100644 (file)
@@ -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