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.

address CR feedback

Steven Tey2b877345532e
diff --git a/apps/web/lib/rewardful/import-partners.ts b/apps/web/lib/rewardful/import-partners.ts
index 0578f0f31d..c10c1ce5ea 100644
--- a/apps/web/lib/rewardful/import-partners.ts
+++ b/apps/web/lib/rewardful/import-partners.ts
@@ -89,7 +89,9 @@ export async function importPartners(payload: RewardfulImportPayload) {
clickRewardId: defaultGroup.clickRewardId,
discountId: defaultGroup.discountId,
partnerGroupDefaultLinkId:
- defaultGroup.partnerGroupDefaultLinks[0].id,
+ defaultGroup.partnerGroupDefaultLinks.length > 0
+ ? defaultGroup.partnerGroupDefaultLinks[0].id
+ : null,
},
}),
),