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 env variable check for local development

Tim Wilsonc2a9df2e18f1
diff --git a/apps/web/lib/api/links.ts b/apps/web/lib/api/links.ts
index 83d4f5b629..762c1734c0 100644
--- a/apps/web/lib/api/links.ts
+++ b/apps/web/lib/api/links.ts
@@ -739,7 +739,7 @@ export async function editLink({
image = secure_url;
}
// if there's no proxy enabled or no image, delete the image in Cloudinary
- } else {
+ } else if (process.env.CLOUDINARY_URL) {
await cloudinary.v2.uploader.destroy(`${domain}/${key}`, {
invalidate: true,
});