Skip to content

Commit

Permalink
fix: use userPhone instead of phone for switch case (#16384)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
2 people authored and zomars committed Sep 4, 2024
1 parent d315dfd commit 8c4779a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
: {
Expand Down

0 comments on commit 8c4779a

Please sign in to comment.