Skip to content
This repository has been archived by the owner on Apr 7, 2021. It is now read-only.

Commit

Permalink
Merge pull request #7 from kasperlegarth/Fallback-for-posts-with-no-c…
Browse files Browse the repository at this point in the history
…aptions

Added check to see if there is a caption to show
  • Loading branch information
kasperlegarth authored Nov 6, 2019
2 parents 4a71037 + 079026f commit d7d8d02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion instastory.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

let templateCodes = {
"{{accessibility_caption}}" : post.accessibility_caption,
"{{caption}}": post.edge_media_to_caption.edges[0].node.text,
"{{caption}}": ((post.edge_media_to_caption.edges.length > 0) ? post.edge_media_to_caption.edges[0].node.text : ""),
"{{comments}}": post.edge_media_to_comment.count,
"{{image}}": getImageSize(post),
"{{likes}}": post.edge_liked_by.count,
Expand Down

0 comments on commit d7d8d02

Please sign in to comment.