Fix rare type error caused by invalid tweet data

This commit is contained in:
dangered wolf 2023-12-08 18:47:03 -05:00
parent 55c920ecbf
commit 0c89e5b6b3
No known key found for this signature in database
GPG key ID: 41E4D37680ED8B58

View file

@ -179,7 +179,7 @@ const processResponse = (instructions: ThreadInstruction[]): GraphQLProcessBucke
if (content.__typename === 'TimelineTimelineItem') { if (content.__typename === 'TimelineTimelineItem') {
const itemContentType = content.itemContent?.__typename; const itemContentType = content.itemContent?.__typename;
if (itemContentType === 'TimelineTweet') { if (itemContentType === 'TimelineTweet') {
const entryType = content.itemContent.tweet_results.result.__typename; const entryType = content.itemContent.tweet_results.result?.__typename;
if (entryType === 'Tweet') { if (entryType === 'Tweet') {
bucket.statuses.push( bucket.statuses.push(
content.itemContent.tweet_results.result as GraphQLTwitterStatus content.itemContent.tweet_results.result as GraphQLTwitterStatus