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>
This commit is contained in:
co-authored by
Anik Dhabal Babu
parent
ee8cc81862
commit
0190ca6711
+2
-2
@@ -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
|
||||
: {
|
||||
|
||||
Reference in New Issue
Block a user