Skip to content

Commit

Permalink
- app version = 5.8.11 (#651)
Browse files Browse the repository at this point in the history
- delete officer email if it's null

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>
  • Loading branch information
severinbeauvais and Severin Beauvais authored Feb 8, 2024
1 parent 4bead95 commit 98b366c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "business-create-ui",
"version": "5.8.10",
"version": "5.8.11",
"private": true,
"appName": "Create UI",
"sbcName": "SBC Common Components",
Expand Down
5 changes: 3 additions & 2 deletions src/mixins/filing-template-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1468,14 +1468,15 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM
}

/**
* Fixes addresses by deleting the type in case it was null.
* Fixes addresses by deleting the type in case it is null. Also fixes null officer email.
* @param orgPeople The array of orgs/people
* @returns the array of orgs/people after addresses been fixed
* @returns the array of orgs/people with fixed address types and email
*/
fixNullAddressType (orgPeople: OrgPersonIF[]): OrgPersonIF[] {
return orgPeople.map(p => {
if (p.deliveryAddress?.addressType === null) delete p.deliveryAddress.addressType
if (p.mailingAddress?.addressType === null) delete p.mailingAddress.addressType
if (p.officer?.email === null) delete p.officer.email
return p
})
}
Expand Down

0 comments on commit 98b366c

Please sign in to comment.