diff --git a/Redditlikekerfuffle.HTML b/Redditlikekerfuffle.HTML index 9aceee9..f3e4d8a 100644 --- a/Redditlikekerfuffle.HTML +++ b/Redditlikekerfuffle.HTML @@ -3,19 +3,18 @@ - Bitt -

Use this as you would Twitter, oh, sorry X

+ Anonymous Twitter
-

Post a Bitt

+

Post a Tweet


-

Bitters

+

Tweets

@@ -31,7 +30,10 @@ function fetchTweets() { fetch(githubApiUrl) .then(response => response.json()) - .then(files => { + .then(responseData => { + // Check if responseData is an array + const files = Array.isArray(responseData) ? responseData : []; + const tweetFiles = files .filter(file => file.name.endsWith('.json')) .sort((a, b) => b.name.localeCompare(a.name)); // Sort by filename in descending order