mirror of
https://github.com/CompeyDev/fxtwitter-docker.git
synced 2025-04-07 03:20:55 +01:00
Fix comment about this
This commit is contained in:
parent
dabe538f35
commit
8a9ca111c2
1 changed files with 3 additions and 1 deletions
|
@ -173,7 +173,9 @@ const populateTweetProperties = async (
|
|||
}
|
||||
|
||||
/* Workaround: Force player card by default for videos */
|
||||
// @ts-expect-error Inexplicably, twitter_card becomes type of 'tweet' instead of 'tweet' | 'summary' | 'summary_large_image' | 'player'
|
||||
/* TypeScript gets confused and re-interprets the type'tweet' instead of 'tweet' | 'summary' | 'summary_large_image' | 'player'
|
||||
The mediaList however can set it to something else. TODO: Reimplement as enums */
|
||||
// @ts-expect-error see above comment
|
||||
if (apiTweet.media?.videos && apiTweet.twitter_card !== 'player') {
|
||||
apiTweet.twitter_card = 'player';
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue