Skip to content

Commit

Permalink
randommeme check for odd gallery posts with 0 media files
Browse files Browse the repository at this point in the history
e.g.: `/r/kemonomimi/comments/1ghsp81`
  • Loading branch information
Supinic committed Nov 5, 2024
1 parent 9a87579 commit c85c740
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion commands/randommeme/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module.exports = class RedditPost {
this.#score = data.ups ?? 0;

this.#galleryLinks = [];
if (data.is_gallery) {
if (data.is_gallery && data.gallery_data) {
const meta = data.media_metadata;
for (const item of data.gallery_data.items) {
const itemMeta = meta[item.media_id];
Expand Down

0 comments on commit c85c740

Please sign in to comment.