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 static tweet

Steven Tey7f78e5d6f796
diff --git a/app/ui/content/mdx.tsx b/app/ui/content/mdx.tsx
index 01b61a6b0c..a60b289ee6 100644
--- a/app/ui/content/mdx.tsx
+++ b/app/ui/content/mdx.tsx
@@ -125,7 +125,8 @@ export function MDX({ code, images, tweets, repos, className }: MDXProps) {
const Tweet = ({ id }: { id: string }) => {
if (!tweets) return null;
- const tweet = tweets.find((tweet: TweetProps) => tweet.id_str === id);
+ const tweet = tweets.find((tweet: TweetProps) => tweet?.id_str === id);
+ if (!tweet) return null;
return <MDXTweet data={tweet} className="mx-auto max-w-lg" noTilt />;
};