From 59ed4820bc7bfb67ca41ab5957bca2ce49b60c89 Mon Sep 17 00:00:00 2001 From: Joscha Feth Date: Tue, 30 Jul 2024 13:49:52 +0100 Subject: [PATCH] fix: mixin for undefined cases --- src/v1/persons.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v1/persons.ts b/src/v1/persons.ts index 7704e79..f70ca92 100644 --- a/src/v1/persons.ts +++ b/src/v1/persons.ts @@ -350,8 +350,8 @@ export class Persons { const response = await this.axios.post( 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