From 0cf2a8ba67f5e09588a0a3bd558fc6d06a42229b Mon Sep 17 00:00:00 2001 From: dangered wolf Date: Sun, 12 Nov 2023 03:18:58 -0500 Subject: [PATCH] Fix flaky isGraphQLTweet handling --- src/helpers/graphql.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/helpers/graphql.ts b/src/helpers/graphql.ts index 0e10623..6d4049a 100644 --- a/src/helpers/graphql.ts +++ b/src/helpers/graphql.ts @@ -18,7 +18,6 @@ export const isGraphQLTweet = (response: unknown): response is GraphQLTweet => { response !== null && (('__typename' in response && (response.__typename === 'Tweet' || response.__typename === 'TweetWithVisibilityResults')) || - // @ts-expect-error it's 6 am please let me sleep - ('legacy' in response && response.legacy?.full_text)) + typeof (response as GraphQLTweet).legacy?.full_text === 'string') ); };