it happens because some posts does not have images or images hosted externally, we can use a fallback image like this
for (var i = 0; i < json.feed.entry.length; i++) {
var title = json.feed.entry[i].title.$t
var url = json.feed.entry[i].link.pop().href;
// define thumbnail variable
var thumbnail;
if (json.feed.entry[i].media$thumbnail) {
thumbUrl =
…
Top comments (0)