From 0190ca6711a9c6be721b4e20d98d7fb8329c16d8 Mon Sep 17 00:00:00 2001 From: Nicolaos Moscholios Date: Wed, 28 Aug 2024 15:37:02 +0200 Subject: [PATCH] fix: use `userPhone` instead of `phone` for switch case (#16384) * fix: use `userPhone` instead of `phone` for switch case Currently this switch case never gets to the last case ("phone") as the type expected is wrong. Here the type may have value `userPhone` and not `phone`. * fix another case --------- Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com> --- .../atom-api-transformers/transformApiEventTypeForAtom.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/platform/atoms/event-types/atom-api-transformers/transformApiEventTypeForAtom.ts b/packages/platform/atoms/event-types/atom-api-transformers/transformApiEventTypeForAtom.ts index fb8c91f74d..8bc47a94f6 100644 --- a/packages/platform/atoms/event-types/atom-api-transformers/transformApiEventTypeForAtom.ts +++ b/packages/platform/atoms/event-types/atom-api-transformers/transformApiEventTypeForAtom.ts @@ -190,11 +190,11 @@ function getLocations(locations: EventTypeOutput_2024_06_14["locations"]) { const { displayLocationPublicly, type } = location; switch (type) { - case "address": + case "inPerson": return displayLocationPublicly ? location : { ...location, address: "" }; case "link": return displayLocationPublicly ? location : { ...location, link: "" }; - case "phone": + case "userPhone": return displayLocationPublicly ? location : {