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.

fix ts

Steven Tey6241b7a010ab
diff --git a/apps/web/ui/modals/link-builder/options-list.tsx b/apps/web/ui/modals/link-builder/options-list.tsx
index 406fefadf3..bb6c8ee6f9 100644
--- a/apps/web/ui/modals/link-builder/options-list.tsx
+++ b/apps/web/ui/modals/link-builder/options-list.tsx
@@ -50,11 +50,12 @@ export function OptionsList() {
toggle={item}
{...(item.type === "modal" &&
"enabled" in item &&
+ typeof item.enabled === "function" &&
item.enabled(data) && {
icon: <item.icon className="size-3.5 text-blue-500" />,
})}
onRemove={() =>
- "remove" in item
+ "remove" in item && typeof item.remove === "function"
? item.remove(setValue)
: setValue(item.key as any, false, { shouldDirty: true })
}