Skip to content

Commit

Permalink
Reorder condition for initial contact selection
Browse files Browse the repository at this point in the history
By putting government user check first, it only
checks the parcel owners length if not a government
user.
  • Loading branch information
trslater committed Jun 11, 2024
1 parent 2b22432 commit 8508e93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,10 @@ export class PrimaryContactComponent extends FilesStepComponent implements OnIni
// onSelectOwner only not called on first load of page
if (selectedOwner) {
this.onSelectOwner(selectedOwner.uuid);
} else if (parcelOwners.length === 1) {
this.onSelectOwner(parcelOwners[0].uuid);
} else if (this.isGovernmentUser) {
this.onSelectGovernment();
} else if (parcelOwners.length === 1) {
this.onSelectOwner(parcelOwners[0].uuid);
}

if (this.isGovernmentUser && this.selectedLocalGovernment) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@ export class PrimaryContactComponent extends FilesStepComponent implements OnIni
// onSelectOwner only not called on first load of page
if (selectedOwner) {
this.onSelectOwner(selectedOwner.uuid);
} else if (parcelOwners.length === 1) {
this.onSelectOwner(parcelOwners[0].uuid);
} else if (this.isGovernmentUser) {
this.onSelectGovernment();
} else if (parcelOwners.length === 1) {
this.onSelectOwner(parcelOwners[0].uuid);
}

if (this.selectedLocalGovernment) {
Expand Down

0 comments on commit 8508e93

Please sign in to comment.