Skip to content

Commit

Permalink
correct null vs undefined at model level.
Browse files Browse the repository at this point in the history
  • Loading branch information
devinleighsmith committed Jul 4, 2023
1 parent 95b9bf3 commit 11bf53d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions source/frontend/src/features/leases/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,9 @@ export class LeaseFormModel {
leaseDetail.otherProgramTypeDescription = apiModel?.otherProgramType || '';
leaseDetail.otherPurposeTypeDescription = apiModel?.otherPurposeType || '';
leaseDetail.otherLeaseTypeDescription = apiModel?.otherType || '';
leaseDetail.project =
apiModel?.project !== undefined
? { id: apiModel?.project?.id || 0, text: apiModel?.project?.description || '' }
: undefined;
leaseDetail.project = !!apiModel?.project
? { id: apiModel?.project?.id || 0, text: apiModel?.project?.description || '' }
: undefined;
leaseDetail.apiProject = apiModel?.project || null;

const sortedConsultations = apiModel?.consultations?.sort(
Expand Down

0 comments on commit 11bf53d

Please sign in to comment.