Skip to content

Commit

Permalink
add support for videos in carousel
Browse files Browse the repository at this point in the history
  • Loading branch information
oroce authored May 9, 2017
1 parent db9220e commit b378f10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/posts.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class InstagramPosts extends Readable
when 'video'
post.media = rawPost.videos['standard_resolution'].url
when 'carousel'
post.media = rawPost.carousel_media.map((media) -> media.images['standard_resolution'].url)
post.media = rawPost.carousel_media.map((media) -> media[if media.images then 'images' else 'videos']['standard_resolution'].url)
else
throw new Error("Instagram did not return a URL for the media on post
#{post.id}")
Expand Down

0 comments on commit b378f10

Please sign in to comment.