Skip to content

Commit dc8b575

Browse files
authored
Merge pull request #1267 from SAY-5/fix-construct-tweet-undefined-full-text
fix: guard constructTweet against undefined full_text
2 parents 89e41a1 + 79e77b6 commit dc8b575

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/tweetConstructor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ async function constructTweet(t, tweetConstructorArgs, options = {}) {
669669
// Main text content
670670
const longShortClass =
671671
vars.noBigFont ||
672-
t.full_text.length > 280 ||
672+
(t.full_text?.length ?? 0) > 280 ||
673673
!options.bigFont ||
674674
(!options.mainTweet && location.pathname.includes("/status/"))
675675
? "tweet-body-text-long"

0 commit comments

Comments
 (0)