mirror of
https://codeberg.org/tacerus/teddit.git
synced 2024-11-22 06:49:26 +01:00
check that post media_metadata exists (fixes #250)
This commit is contained in:
parent
5a01338428
commit
a9f13741bb
@ -260,6 +260,7 @@ async function processJsonPost(json, parsed, user_preferences) {
|
||||
obj.gallery_items = [];
|
||||
for (var i = 0; i < post.gallery_data.items.length; i++) {
|
||||
let id = post.gallery_data.items[i].media_id;
|
||||
if (post.media_metadata) {
|
||||
if (post.media_metadata[id]) {
|
||||
if (post.media_metadata[id].p) {
|
||||
if (post.media_metadata[id].p[0]) {
|
||||
@ -284,6 +285,7 @@ async function processJsonPost(json, parsed, user_preferences) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let comms = [];
|
||||
for (var i = 0; i < comments.length; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user