From d26f090bdd79d9e6f2b1096cfd9d1963183830c7 Mon Sep 17 00:00:00 2001 From: dangered wolf Date: Sat, 4 Nov 2023 03:24:46 -0400 Subject: [PATCH] Use optionals here for safety --- src/providers/twitter/conversation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/providers/twitter/conversation.ts b/src/providers/twitter/conversation.ts index 3fc449e..59381ff 100644 --- a/src/providers/twitter/conversation.ts +++ b/src/providers/twitter/conversation.ts @@ -62,7 +62,7 @@ export const fetchTweetDetail = async ( const conversation = _conversation as TweetDetailResult; const tweet = findTweetInBucket( status, - processResponse(conversation.data.threaded_conversation_with_injections_v2.instructions) + processResponse(conversation.data?.threaded_conversation_with_injections_v2?.instructions) ); if (tweet && isGraphQLTweet(tweet)) { return true;