Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

add try catch

Kiran K3cda066c7836
diff --git a/apps/web/ui/customers/customer-activity-list.tsx b/apps/web/ui/customers/customer-activity-list.tsx
index 46e53a84b2..58a2e435ff 100644
--- a/apps/web/ui/customers/customer-activity-list.tsx
+++ b/apps/web/ui/customers/customer-activity-list.tsx
@@ -89,7 +89,13 @@ const activityData = {
lead: {
icon: UserCheck,
content: (event) => {
- const metadata = event.metadata ? JSON.parse(event.metadata) : null;
+ let metadata = null;
+
+ try {
+ metadata = event.metadata ? JSON.parse(event.metadata) : null;
+ } catch (e) {
+ //
+ }
return (
<div className="flex flex-col gap-1">
@@ -103,7 +109,13 @@ const activityData = {
sale: {
icon: MoneyBill2,
content: (event) => {
- const metadata = event.metadata ? JSON.parse(event.metadata) : null;
+ let metadata = null;
+
+ try {
+ metadata = event.metadata ? JSON.parse(event.metadata) : null;
+ } catch (e) {
+ //
+ }
return (
<div className="flex flex-col gap-1">