Skip to content

Commit

Permalink
fix: mixin for undefined cases
Browse files Browse the repository at this point in the history
  • Loading branch information
joscha committed Jul 30, 2024
1 parent b548c19 commit 59ed482
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/v1/persons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ export class Persons {
const response = await this.axios.post<SimplePersonResponse>(
personsUrl(),
{
emails: [], // the API requires this field to be present
...data,
emails: data.emails ?? [], // the API requires this field to be present
},
)
return response.data
Expand Down

0 comments on commit 59ed482

Please sign in to comment.