File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,8 @@ export const buildTweetApiUtils = (args: buildTweetApiUtilsArgs): TweetApiUtilsD
7474 const user = userOrNullConverter ( tweet . core . userResults . result ) ;
7575 if ( user == null ) return undefined ;
7676 const quoted = tweet . quotedStatusResult ;
77- const retweeted = tweet . legacy . retweetedStatusResult ;
77+ const retweeted = tweet . legacy ?. retweetedStatusResult ;
78+
7879 const reply =
7980 args . reply
8081 ?. map ( ( e ) => buildTweetApiUtils ( { result : e . tweetResults , promotedMetadata : e . promotedMetadata } ) )
@@ -91,6 +92,7 @@ export const buildTweetApiUtils = (args: buildTweetApiUtilsArgs): TweetApiUtilsD
9192} ;
9293
9394export const tweetResultsConverter = ( tweetResults : i . ItemResult ) : i . Tweet | undefined => {
95+ if ( tweetResults . result == undefined ) return undefined ;
9496 switch ( tweetResults . result . typename ) {
9597 case i . TypeName . Tweet :
9698 return tweetResults . result as i . Tweet ;
You can’t perform that action at this time.
0 commit comments