Skip to content

Commit

Permalink
Merge pull request #719 from j-fbriere/ca/fix_713
Browse files Browse the repository at this point in the history
fix for tweets with deleted comments.
  • Loading branch information
jonjomckay committed May 13, 2023
2 parents fe6c2db + a34a5db commit 9bc72d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,9 @@ class Twitter {
for (var item in entry['content']['items']) {
var itemType = item['item']?['itemContent']?['itemType'];
if (itemType == 'TimelineTweet') {
tweets.add(TweetWithCard.fromGraphqlJson(item['item']['itemContent']['tweet_results']['result']));
if (item['item']['itemContent']['tweet_results']?['result'] != null) {
tweets.add(TweetWithCard.fromGraphqlJson(item['item']['itemContent']['tweet_results']['result']));
}
} else {
Catcher.reportSyntheticException(UnknownTimelineItemType(itemType, entryId));
}
Expand Down

0 comments on commit 9bc72d1

Please sign in to comment.